Spaces:
Running
on
Zero
Running
on
Zero
Update search_history.py
Browse files- search_history.py +2 -2
search_history.py
CHANGED
@@ -61,12 +61,12 @@ class SearchHistoryComponent:
|
|
61 |
if results: # 只有在有結果時才顯示結果區域
|
62 |
html += """
|
63 |
<div class="results-list" style="margin-top: 16px;">
|
64 |
-
<h4 style="margin-bottom: 12px;">Top
|
65 |
<div class="breed-list">
|
66 |
"""
|
67 |
|
68 |
# 顯示每個推薦結果
|
69 |
-
for i, result in enumerate(results[:
|
70 |
breed = result.get('breed', 'Unknown breed')
|
71 |
score = result.get('overall_score', 0) # 改用 overall_score
|
72 |
if isinstance(score, (int, float)): # 確保分數是數字
|
|
|
61 |
if results: # 只有在有結果時才顯示結果區域
|
62 |
html += """
|
63 |
<div class="results-list" style="margin-top: 16px;">
|
64 |
+
<h4 style="margin-bottom: 12px;">Top 15 Breed Matches:</h4>
|
65 |
<div class="breed-list">
|
66 |
"""
|
67 |
|
68 |
# 顯示每個推薦結果
|
69 |
+
for i, result in enumerate(results[:15], 1):
|
70 |
breed = result.get('breed', 'Unknown breed')
|
71 |
score = result.get('overall_score', 0) # 改用 overall_score
|
72 |
if isinstance(score, (int, float)): # 確保分數是數字
|