Spaces:
Sleeping
Sleeping
Commit
·
9822b4d
1
Parent(s):
5948b80
Update app.py
Browse files
app.py
CHANGED
@@ -57,10 +57,11 @@ def predict_class(image):
|
|
57 |
def classify_image(image):
|
58 |
results = predict_class(image)
|
59 |
output = {}
|
60 |
-
for index in range(len(results)):
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
64 |
return output
|
65 |
|
66 |
|
|
|
57 |
def classify_image(image):
|
58 |
results = predict_class(image)
|
59 |
output = {}
|
60 |
+
# for index in range(len(results)):
|
61 |
+
# predicted_label = labels.get(index)
|
62 |
+
# score = results[index]
|
63 |
+
# output[predicted_label] = str(score)
|
64 |
+
output = {labels.get(i): float(prediction[i]) for i in range(len(results))}
|
65 |
return output
|
66 |
|
67 |
|