Spaces:
Runtime error
Runtime error
Eugene Siow
commited on
Commit
·
6daa8b4
1
Parent(s):
15a42be
Add fix for output to PIL image.
Browse files
app.py
CHANGED
@@ -45,8 +45,8 @@ def inference(img, scale_str, model_name):
|
|
45 |
preds = model(inputs)
|
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 |
|
|
|
45 |
preds = model(inputs)
|
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 |
|