Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -540,9 +540,7 @@ async def predict(image):
|
|
540 |
breed = topk_breeds[0]
|
541 |
description = get_dog_description(breed)
|
542 |
html_output += format_description_html(description, breed)
|
543 |
-
|
544 |
-
html_output += f'<div class="breed-buttons"><button class="breed-button" onclick="handle_button_click(\'{button_id}\')">{breed}</button></div>'
|
545 |
-
buttons.append(button_id)
|
546 |
elif combined_confidence >= 0.15:
|
547 |
html_output += f"<p>Top 3 possible breeds:</p><ul>"
|
548 |
for j, (breed, prob) in enumerate(zip(topk_breeds[:3], topk_probs_percent[:3])):
|
@@ -554,6 +552,7 @@ async def predict(image):
|
|
554 |
html_output += f'<button class="breed-button" onclick="handle_button_click(\'{button_id}\')">{breed}</button>'
|
555 |
buttons.append(button_id)
|
556 |
html_output += '</div>'
|
|
|
557 |
else:
|
558 |
html_output += "<p>The image is unclear or the breed is not in the dataset. Please upload a clearer image.</p>"
|
559 |
|
|
|
540 |
breed = topk_breeds[0]
|
541 |
description = get_dog_description(breed)
|
542 |
html_output += format_description_html(description, breed)
|
543 |
+
|
|
|
|
|
544 |
elif combined_confidence >= 0.15:
|
545 |
html_output += f"<p>Top 3 possible breeds:</p><ul>"
|
546 |
for j, (breed, prob) in enumerate(zip(topk_breeds[:3], topk_probs_percent[:3])):
|
|
|
552 |
html_output += f'<button class="breed-button" onclick="handle_button_click(\'{button_id}\')">{breed}</button>'
|
553 |
buttons.append(button_id)
|
554 |
html_output += '</div>'
|
555 |
+
|
556 |
else:
|
557 |
html_output += "<p>The image is unclear or the breed is not in the dataset. Please upload a clearer image.</p>"
|
558 |
|