Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,10 +22,7 @@ def load_img (filename):
|
|
22 |
return img_tensor
|
23 |
|
24 |
def process_img(image):
|
25 |
-
|
26 |
-
img = img / 255.
|
27 |
-
img = img.astype(np.float32)
|
28 |
-
y = torch.tensor(img).permute(2,0,1).unsqueeze(0).to(device)
|
29 |
|
30 |
with torch.no_grad():
|
31 |
result = model(y)
|
|
|
22 |
return img_tensor
|
23 |
|
24 |
def process_img(image):
|
25 |
+
y = img.to(device)
|
|
|
|
|
|
|
26 |
|
27 |
with torch.no_grad():
|
28 |
result = model(y)
|