Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -394,12 +394,14 @@ async def predict(image):
|
|
394 |
buttons_html += f'<button class="breed-button" onclick="handle_button_click(\'{button_id}\')">{breed}</button>'
|
395 |
buttons.append(button_id)
|
396 |
|
397 |
-
|
398 |
-
dogs_info += f'<div class="breed-buttons">{buttons_html}</div>'
|
399 |
|
400 |
else:
|
401 |
dogs_info += "<p>The image is unclear or the breed is not in the dataset. Please upload a clearer image.</p>"
|
402 |
-
|
|
|
|
|
|
|
403 |
dogs_info += '</div>'
|
404 |
|
405 |
# 清空 buttons_html 確保不會在整體上出現重複
|
|
|
394 |
buttons_html += f'<button class="breed-button" onclick="handle_button_click(\'{button_id}\')">{breed}</button>'
|
395 |
buttons.append(button_id)
|
396 |
|
397 |
+
|
|
|
398 |
|
399 |
else:
|
400 |
dogs_info += "<p>The image is unclear or the breed is not in the dataset. Please upload a clearer image.</p>"
|
401 |
+
|
402 |
+
|
403 |
+
# 在該品種區塊中顯示按鈕
|
404 |
+
dogs_info += f'<div class="breed-buttons">{buttons_html}</div>'
|
405 |
dogs_info += '</div>'
|
406 |
|
407 |
# 清空 buttons_html 確保不會在整體上出現重複
|