Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def classify_image(img: Image.Image):
|
|
38 |
top_label, top_score = sorted_probs[0]
|
39 |
|
40 |
logger.debug(f"Top prediction: {top_label} with confidence {top_score:.2%}")
|
41 |
-
return
|
42 |
except Exception as e:
|
43 |
logger.exception("Error during classification")
|
44 |
raise e
|
|
|
38 |
top_label, top_score = sorted_probs[0]
|
39 |
|
40 |
logger.debug(f"Top prediction: {top_label} with confidence {top_score:.2%}")
|
41 |
+
return top_label, dict(sorted_probs)
|
42 |
except Exception as e:
|
43 |
logger.exception("Error during classification")
|
44 |
raise e
|