Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
|
@@ -53,7 +53,7 @@ def preprocess_input(input):
|
|
| 53 |
def predict(img):
|
| 54 |
x = torch.tensor(preprocess_input(img), dtype=torch.float32)
|
| 55 |
with torch.no_grad():
|
| 56 |
-
return model(x.unsqueeze(0)).argmax().item()
|
| 57 |
|
| 58 |
# Design UI
|
| 59 |
gr.Interface(fn=predict,
|
|
|
|
| 53 |
def predict(img):
|
| 54 |
x = torch.tensor(preprocess_input(img), dtype=torch.float32)
|
| 55 |
with torch.no_grad():
|
| 56 |
+
return model(x.unsqueeze(0)).argmax(1).item()
|
| 57 |
|
| 58 |
# Design UI
|
| 59 |
gr.Interface(fn=predict,
|