Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,6 +52,7 @@ def preprocess_input(input):
|
|
| 52 |
# Define a predict function
|
| 53 |
def predict(img):
|
| 54 |
x = torch.tensor(preprocess_input(img), dtype=torch.float32)
|
|
|
|
| 55 |
with torch.no_grad():
|
| 56 |
print(model(x.unsqueeze(0)))
|
| 57 |
return model(x.unsqueeze(0)).argmax(1).item()
|
|
|
|
| 52 |
# Define a predict function
|
| 53 |
def predict(img):
|
| 54 |
x = torch.tensor(preprocess_input(img), dtype=torch.float32)
|
| 55 |
+
print(x)
|
| 56 |
with torch.no_grad():
|
| 57 |
print(model(x.unsqueeze(0)))
|
| 58 |
return model(x.unsqueeze(0)).argmax(1).item()
|