Spaces:
Runtime error
Runtime error
Float the preds
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ def _preprocess(image_path: str):
|
|
| 19 |
def predict(image):
|
| 20 |
image_array = _preprocess(image)
|
| 21 |
predictions = model.predict(image_array)[0] # single pred batch
|
| 22 |
-
return {k:v for k, v in zip(CLASS_LABELS, predictions)}
|
| 23 |
|
| 24 |
gr.Interface(
|
| 25 |
predict,
|
|
|
|
| 19 |
def predict(image):
|
| 20 |
image_array = _preprocess(image)
|
| 21 |
predictions = model.predict(image_array)[0] # single pred batch
|
| 22 |
+
return {k: float(v) for k, v in zip(CLASS_LABELS, predictions)}
|
| 23 |
|
| 24 |
gr.Interface(
|
| 25 |
predict,
|