Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ def predict_image(img):
|
|
| 17 |
img = transforms.ToPILImage()(img)
|
| 18 |
img = transforms.Resize((256,256))(img)
|
| 19 |
prediction=clf.predict(img)
|
| 20 |
-
print(
|
| 21 |
print(model.config.id2label[predicted_label])
|
| 22 |
return {class_names[i]: float(prediction[i]["score"]) for i in range(2)}
|
| 23 |
|
|
|
|
| 17 |
img = transforms.ToPILImage()(img)
|
| 18 |
img = transforms.Resize((256,256))(img)
|
| 19 |
prediction=clf.predict(img)
|
| 20 |
+
print(prediction)
|
| 21 |
print(model.config.id2label[predicted_label])
|
| 22 |
return {class_names[i]: float(prediction[i]["score"]) for i in range(2)}
|
| 23 |
|