Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -43,10 +43,11 @@ def classify_image(inp):
|
|
43 |
# result[label] = float(predicted_class_indices[i])
|
44 |
# except KeyError:
|
45 |
# print(f"KeyError: Label not found for index {predicted_class_indices[i]}")
|
46 |
-
result = [f"{label}: {prediction:.2f}" for label, prediction in
|
47 |
return ", ".join(result)
|
48 |
|
49 |
|
|
|
50 |
|
51 |
|
52 |
|
|
|
43 |
# result[label] = float(predicted_class_indices[i])
|
44 |
# except KeyError:
|
45 |
# print(f"KeyError: Label not found for index {predicted_class_indices[i]}")
|
46 |
+
result = [f"{label}: {prediction:.2f}" for label, prediction in labels.items()]
|
47 |
return ", ".join(result)
|
48 |
|
49 |
|
50 |
+
|
51 |
|
52 |
|
53 |
|