Spaces:
Sleeping
Sleeping
Commit
·
cfbc699
1
Parent(s):
33007ff
Update app.py
Browse files
app.py
CHANGED
@@ -60,6 +60,7 @@ def predict_class(image):
|
|
60 |
def classify_image(image):
|
61 |
results = predict_class(image)
|
62 |
output = {labels.get(i): float(results[i]) for i in range(len(results))}
|
|
|
63 |
return output
|
64 |
|
65 |
|
|
|
60 |
def classify_image(image):
|
61 |
results = predict_class(image)
|
62 |
output = {labels.get(i): float(results[i]) for i in range(len(results))}
|
63 |
+
result = output if max(output.values) >=1 else {"other": 1}
|
64 |
return output
|
65 |
|
66 |
|