DawnC commited on
Commit
4be9e5a
·
1 Parent(s): 6924371

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
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
- button_id = f"Dog {i+1}: More about {breed}"
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