Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -541,9 +541,9 @@ async def predict(image):
|
|
541 |
description = get_dog_description(breed)
|
542 |
html_output += f"<p><strong>{breed}</strong> ({top1_prob:.2%} confidence)</p>"
|
543 |
html_output += format_description_html(description, breed)
|
544 |
-
|
545 |
elif combined_confidence >= 0.15:
|
546 |
-
html_output +=
|
547 |
for j, (breed, prob) in enumerate(zip(topk_breeds[:3], topk_probs_percent[:3])):
|
548 |
html_output += f"<li><strong>{breed}</strong> ({prob})</li>"
|
549 |
html_output += "</ul>"
|
@@ -558,6 +558,7 @@ async def predict(image):
|
|
558 |
|
559 |
html_output += '</div>'
|
560 |
|
|
|
561 |
if buttons:
|
562 |
html_output += """
|
563 |
<script>
|
|
|
541 |
description = get_dog_description(breed)
|
542 |
html_output += f"<p><strong>{breed}</strong> ({top1_prob:.2%} confidence)</p>"
|
543 |
html_output += format_description_html(description, breed)
|
544 |
+
|
545 |
elif combined_confidence >= 0.15:
|
546 |
+
html_output += "<p>Top 3 possible breeds:</p><ul>"
|
547 |
for j, (breed, prob) in enumerate(zip(topk_breeds[:3], topk_probs_percent[:3])):
|
548 |
html_output += f"<li><strong>{breed}</strong> ({prob})</li>"
|
549 |
html_output += "</ul>"
|
|
|
558 |
|
559 |
html_output += '</div>'
|
560 |
|
561 |
+
|
562 |
if buttons:
|
563 |
html_output += """
|
564 |
<script>
|