Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -521,9 +521,6 @@ async def predict(image):
|
|
521 |
# dogs_info = ""
|
522 |
# buttons_html = ""
|
523 |
|
524 |
-
dogs_info += f'<div class="dog-info" style="border-left: 5px solid {color}; margin-bottom: 20px; padding: 15px;">'
|
525 |
-
dogs_info += f'<h2>Dog {i+1}</h2>'
|
526 |
-
|
527 |
for i, (cropped_image, detection_confidence, box) in enumerate(dogs):
|
528 |
top1_prob, topk_breeds, topk_probs_percent = await predict_single_dog(cropped_image)
|
529 |
color = color_list[i % len(color_list)]
|
@@ -531,7 +528,8 @@ async def predict(image):
|
|
531 |
draw.text((box[0] + 5, box[1] + 5), f"Dog {i+1}", fill=color, font=font)
|
532 |
|
533 |
combined_confidence = detection_confidence * top1_prob
|
534 |
-
dogs_info += f'<div class="dog-info" style="border-left: 5px solid {color};">'
|
|
|
535 |
dogs_info += f'<h2>Dog {i+1}</h2>'
|
536 |
|
537 |
if top1_prob >= 0.45:
|
|
|
521 |
# dogs_info = ""
|
522 |
# buttons_html = ""
|
523 |
|
|
|
|
|
|
|
524 |
for i, (cropped_image, detection_confidence, box) in enumerate(dogs):
|
525 |
top1_prob, topk_breeds, topk_probs_percent = await predict_single_dog(cropped_image)
|
526 |
color = color_list[i % len(color_list)]
|
|
|
528 |
draw.text((box[0] + 5, box[1] + 5), f"Dog {i+1}", fill=color, font=font)
|
529 |
|
530 |
combined_confidence = detection_confidence * top1_prob
|
531 |
+
#dogs_info += f'<div class="dog-info" style="border-left: 5px solid {color};">'
|
532 |
+
dogs_info += f'<div class="dog-info" style="border-left: 5px solid {color}; margin-bottom: 20px; padding: 15px;">'
|
533 |
dogs_info += f'<h2>Dog {i+1}</h2>'
|
534 |
|
535 |
if top1_prob >= 0.45:
|