Spaces:
Runtime error
Runtime error
removed reshape
Browse files
app.py
CHANGED
|
@@ -114,8 +114,8 @@ def predict_digit(img):
|
|
| 114 |
#img_data = im.fromarray(img)
|
| 115 |
#img_data.save(f"image1.jpg")
|
| 116 |
#count=count+1
|
| 117 |
-
img_3d=img.reshape(-1,28,28)
|
| 118 |
-
img_resized=
|
| 119 |
pred_prob=loaded_model.predict(img_resized)
|
| 120 |
|
| 121 |
pred_prob=pred_prob*100
|
|
|
|
| 114 |
#img_data = im.fromarray(img)
|
| 115 |
#img_data.save(f"image1.jpg")
|
| 116 |
#count=count+1
|
| 117 |
+
# img_3d=img.reshape(-1,28,28)
|
| 118 |
+
img_resized=img/255.0
|
| 119 |
pred_prob=loaded_model.predict(img_resized)
|
| 120 |
|
| 121 |
pred_prob=pred_prob*100
|