Spaces:
Running
Running
Hu
commited on
Commit
·
2175206
1
Parent(s):
d701b84
change PIL load image
Browse files
app.py
CHANGED
|
@@ -127,7 +127,8 @@ model.eval()
|
|
| 127 |
|
| 128 |
def super_reso(image_path):
|
| 129 |
# gradio open image as np array
|
| 130 |
-
|
|
|
|
| 131 |
|
| 132 |
# prediction
|
| 133 |
with torch.no_grad():
|
|
|
|
| 127 |
|
| 128 |
def super_reso(image_path):
|
| 129 |
# gradio open image as np array
|
| 130 |
+
image_array = np.asarray(image_path)
|
| 131 |
+
image = Image.fromarray(image_array, mode="RGB")
|
| 132 |
|
| 133 |
# prediction
|
| 134 |
with torch.no_grad():
|