Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,7 +29,7 @@ def classify_image(image):
|
|
| 29 |
predicted_class = classes[np.argmax(prediction)]
|
| 30 |
confidence = np.max(prediction)
|
| 31 |
|
| 32 |
-
return f"Predicted
|
| 33 |
except Exception as e:
|
| 34 |
return str(e) # Return the error message if something goes wrong
|
| 35 |
|
|
|
|
| 29 |
predicted_class = classes[np.argmax(prediction)]
|
| 30 |
confidence = np.max(prediction)
|
| 31 |
|
| 32 |
+
return f"Predicted Pokémon: {predicted_class}, Confidence: {np.round(confidence * 100, 2)}%"
|
| 33 |
except Exception as e:
|
| 34 |
return str(e) # Return the error message if something goes wrong
|
| 35 |
|