Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ def run_model(img):
|
|
25 |
new_image = load_image(img)
|
26 |
#result = model.predict(new_image)
|
27 |
classes = ['1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
|
28 |
-
|
29 |
result = model.predict(img)
|
30 |
results = dict(zip(classes, result[0]))
|
31 |
return max(results, key = results.get)
|
|
|
25 |
new_image = load_image(img)
|
26 |
#result = model.predict(new_image)
|
27 |
classes = ['1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
|
28 |
+
img = img.reshape((-1, 224, 224, 3))
|
29 |
result = model.predict(img)
|
30 |
results = dict(zip(classes, result[0]))
|
31 |
return max(results, key = results.get)
|