Spaces:
Running
Running
Hu
commited on
Commit
·
ebadb7a
1
Parent(s):
80bbbc3
remove output of original image
Browse files
app.py
CHANGED
|
@@ -95,7 +95,7 @@ def pred_SRCNN(model, image, device, scale_factor=2):
|
|
| 95 |
(original_size[1] * scale_factor, original_size[0] * scale_factor),
|
| 96 |
interpolation=transforms.InterpolationMode.BICUBIC,
|
| 97 |
)(image)
|
| 98 |
-
return out_final, image_bicubic
|
| 99 |
|
| 100 |
|
| 101 |
# load model
|
|
@@ -132,7 +132,7 @@ def super_reso(image):
|
|
| 132 |
|
| 133 |
# prediction
|
| 134 |
with torch.no_grad():
|
| 135 |
-
out_final, image_bicubic
|
| 136 |
model=model, image=image, device=device
|
| 137 |
)
|
| 138 |
# grid = image_grid([out_final,image_bicubic],1,2)
|
|
|
|
| 95 |
(original_size[1] * scale_factor, original_size[0] * scale_factor),
|
| 96 |
interpolation=transforms.InterpolationMode.BICUBIC,
|
| 97 |
)(image)
|
| 98 |
+
return out_final, image_bicubic
|
| 99 |
|
| 100 |
|
| 101 |
# load model
|
|
|
|
| 132 |
|
| 133 |
# prediction
|
| 134 |
with torch.no_grad():
|
| 135 |
+
out_final, image_bicubic = pred_SRCNN(
|
| 136 |
model=model, image=image, device=device
|
| 137 |
)
|
| 138 |
# grid = image_grid([out_final,image_bicubic],1,2)
|