Spaces:
Runtime error
Runtime error
Eugene Siow
commited on
Commit
·
15a42be
1
Parent(s):
f0575e8
Add fix for output to PIL image.
Browse files
app.py
CHANGED
@@ -46,7 +46,8 @@ def inference(img, scale_str, model_name):
|
|
46 |
preds = preds.data.cpu().numpy()
|
47 |
pred = preds[0].transpose((1, 2, 0)) * 255.0
|
48 |
pred = cv2.cvtColor(pred, cv2.COLOR_BGR2RGB)
|
49 |
-
|
|
|
50 |
|
51 |
|
52 |
torch.hub.download_url_to_file('http://people.rennes.inria.fr/Aline.Roumy/results/images_SR_BMVC12/input_groundtruth/baby_mini_d3_gaussian.bmp',
|
|
|
46 |
preds = preds.data.cpu().numpy()
|
47 |
pred = preds[0].transpose((1, 2, 0)) * 255.0
|
48 |
pred = cv2.cvtColor(pred, cv2.COLOR_BGR2RGB)
|
49 |
+
print(type(pred))
|
50 |
+
return Image.fromarray(pred)
|
51 |
|
52 |
|
53 |
torch.hub.download_url_to_file('http://people.rennes.inria.fr/Aline.Roumy/results/images_SR_BMVC12/input_groundtruth/baby_mini_d3_gaussian.bmp',
|