Spaces:
Running
on
Zero
Running
on
Zero
Update recommendation_html_formatter.py
Browse files
recommendation_html_formatter.py
CHANGED
|
@@ -21,10 +21,9 @@ from recommendation_css import (
|
|
| 21 |
|
| 22 |
|
| 23 |
class RecommendationHTMLFormatter:
|
| 24 |
-
"""處理推薦結果的HTML
|
| 25 |
|
| 26 |
def __init__(self):
|
| 27 |
-
# 從 recommendation_css.py 導入 CSS 樣式
|
| 28 |
self.description_search_css = DESCRIPTION_SEARCH_CSS
|
| 29 |
self.criteria_search_css = CRITERIA_SEARCH_CSS
|
| 30 |
self.unified_css = UNIFIED_CSS
|
|
@@ -233,7 +232,7 @@ class RecommendationHTMLFormatter:
|
|
| 233 |
</div>
|
| 234 |
</div>"""
|
| 235 |
else:
|
| 236 |
-
# Find by Criteria:
|
| 237 |
# 計算進度條寬度 - 調整為更有說服力的視覺比例
|
| 238 |
if percentage >= 95:
|
| 239 |
score_width = 92 + (percentage - 95) * 1.2 # 95%+ 顯示為 92-98%
|
|
@@ -458,4 +457,4 @@ class RecommendationHTMLFormatter:
|
|
| 458 |
Learn more about {breed.replace('_', ' ')} on AKC website
|
| 459 |
</a>
|
| 460 |
</div>
|
| 461 |
-
"""
|
|
|
|
| 21 |
|
| 22 |
|
| 23 |
class RecommendationHTMLFormatter:
|
| 24 |
+
"""處理推薦結果的HTML"""
|
| 25 |
|
| 26 |
def __init__(self):
|
|
|
|
| 27 |
self.description_search_css = DESCRIPTION_SEARCH_CSS
|
| 28 |
self.criteria_search_css = CRITERIA_SEARCH_CSS
|
| 29 |
self.unified_css = UNIFIED_CSS
|
|
|
|
| 232 |
</div>
|
| 233 |
</div>"""
|
| 234 |
else:
|
| 235 |
+
# Find by Criteria: 使用簡潔設計,包含獎盃樣式
|
| 236 |
# 計算進度條寬度 - 調整為更有說服力的視覺比例
|
| 237 |
if percentage >= 95:
|
| 238 |
score_width = 92 + (percentage - 95) * 1.2 # 95%+ 顯示為 92-98%
|
|
|
|
| 457 |
Learn more about {breed.replace('_', ' ')} on AKC website
|
| 458 |
</a>
|
| 459 |
</div>
|
| 460 |
+
"""
|