Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,13 +32,14 @@ def transformation(image):
|
|
32 |
|
33 |
url = 'https://paperswithcode.com/media/datasets/Set5-0000002728-07a9793f_zA3bDjj.jpg'
|
34 |
image = Image.open(requests.get(url, stream=True).raw)
|
35 |
-
model = EdsrModel.from_pretrained('eugenesiow/edsr-base', scale=
|
36 |
print('ok')
|
37 |
inputs = ImageLoader.load_image(image)
|
38 |
preds = model(inputs)
|
39 |
print('ok1')
|
40 |
# ImageLoader.save_image(preds, './scaled_2x.png')
|
41 |
-
|
|
|
42 |
#prednumpy=preds.detach().numpy()
|
43 |
return preds
|
44 |
|
|
|
32 |
|
33 |
url = 'https://paperswithcode.com/media/datasets/Set5-0000002728-07a9793f_zA3bDjj.jpg'
|
34 |
image = Image.open(requests.get(url, stream=True).raw)
|
35 |
+
model = EdsrModel.from_pretrained('eugenesiow/edsr-base', scale=4)
|
36 |
print('ok')
|
37 |
inputs = ImageLoader.load_image(image)
|
38 |
preds = model(inputs)
|
39 |
print('ok1')
|
40 |
# ImageLoader.save_image(preds, './scaled_2x.png')
|
41 |
+
ImageLoader.save_compare(inputs, preds, './scaled_2x_compare.png')
|
42 |
+
print("ok2")
|
43 |
#prednumpy=preds.detach().numpy()
|
44 |
return preds
|
45 |
|