Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -106,9 +106,9 @@ def main():
|
|
106 |
|
107 |
if pred_button:
|
108 |
image_prediction(image=image, model=model)
|
109 |
-
outputs = model.predict(image_prediction)
|
110 |
_, y_hat = outputs.max(1)
|
111 |
-
predicted_idx =
|
112 |
right_column.title("Prediction")
|
113 |
right_column.write(predicted_idx)
|
114 |
|
|
|
106 |
|
107 |
if pred_button:
|
108 |
image_prediction(image=image, model=model)
|
109 |
+
outputs = int(model.predict(image_prediction))
|
110 |
_, y_hat = outputs.max(1)
|
111 |
+
predicted_idx = str(y_hat.item())
|
112 |
right_column.title("Prediction")
|
113 |
right_column.write(predicted_idx)
|
114 |
|