Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
@@ -32,7 +32,11 @@ def predict(Image):
|
|
32 |
tranformed_img = transform_image(Image)
|
33 |
model.eval()
|
34 |
img = transform_image(Image)
|
|
|
35 |
#img = torch.from_numpy(tranformed_img)
|
|
|
|
|
|
|
36 |
|
37 |
with torch.no_grad():
|
38 |
grade = torch.softmax(model(img.float()), dim=1)[0]
|
|
|
32 |
tranformed_img = transform_image(Image)
|
33 |
model.eval()
|
34 |
img = transform_image(Image)
|
35 |
+
img = img.reshape(1,3,224,224)
|
36 |
#img = torch.from_numpy(tranformed_img)
|
37 |
+
#outputs = model(img)
|
38 |
+
#class_out = outputs.argmax(dim=1)
|
39 |
+
|
40 |
|
41 |
with torch.no_grad():
|
42 |
grade = torch.softmax(model(img.float()), dim=1)[0]
|