Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -59,8 +59,10 @@ def predict_class(image):
|
|
59 |
|
60 |
# UI Design for multy class output
|
61 |
def classify_image(image):
|
62 |
-
results = predict_class(image)
|
|
|
63 |
output = {labels.get(i): float(results[i]) for i in range(len(results))}
|
|
|
64 |
result = output if max(output.values()) >=0.98 else {"NO_CIFAR10_CLASS": 1}
|
65 |
return result[0]
|
66 |
|
|
|
59 |
|
60 |
# UI Design for multy class output
|
61 |
def classify_image(image):
|
62 |
+
results = predict_class(image)
|
63 |
+
print("results is ...", results)
|
64 |
output = {labels.get(i): float(results[i]) for i in range(len(results))}
|
65 |
+
print("output is ...", output)
|
66 |
result = output if max(output.values()) >=0.98 else {"NO_CIFAR10_CLASS": 1}
|
67 |
return result[0]
|
68 |
|