Spaces:
Build error
Build error
sankhyikii
commited on
Commit
•
cfe0bd9
1
Parent(s):
d93cb75
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ transform = transforms.Compose(
|
|
39 |
|
40 |
def predict(img):
|
41 |
img = transform(img).to('cpu')
|
42 |
-
img =
|
43 |
with torch.no_grad():
|
44 |
out= model(img)
|
45 |
probability = torch.nn.functional.softmax(out[0],dim=0)
|
|
|
39 |
|
40 |
def predict(img):
|
41 |
img = transform(img).to('cpu')
|
42 |
+
img = img.unsqueeze(0)
|
43 |
with torch.no_grad():
|
44 |
out= model(img)
|
45 |
probability = torch.nn.functional.softmax(out[0],dim=0)
|