Spaces:
Running
on
Zero
Running
on
Zero
Update breed_recommendation.py
Browse files- breed_recommendation.py +4 -1
breed_recommendation.py
CHANGED
@@ -530,7 +530,8 @@ def create_recommendation_tab(UserPreferences, get_breed_recommendations, format
|
|
530 |
|
531 |
def on_find_match_click(*args):
|
532 |
try:
|
533 |
-
|
|
|
534 |
<div style="
|
535 |
text-align: center;
|
536 |
padding: 20px;
|
@@ -552,6 +553,7 @@ def create_recommendation_tab(UserPreferences, get_breed_recommendations, format
|
|
552 |
</p>
|
553 |
</div>
|
554 |
""")
|
|
|
555 |
# 創建用戶偏好對象
|
556 |
user_prefs = UserPreferences(
|
557 |
living_space=args[0],
|
@@ -601,6 +603,7 @@ def create_recommendation_tab(UserPreferences, get_breed_recommendations, format
|
|
601 |
results=history_results
|
602 |
)
|
603 |
|
|
|
604 |
return format_recommendation_html(recommendations, is_description_search=False)
|
605 |
|
606 |
except Exception as e:
|
|
|
530 |
|
531 |
def on_find_match_click(*args):
|
532 |
try:
|
533 |
+
# 顯示中間狀態
|
534 |
+
intermediate_message = gr.HTML("""
|
535 |
<div style="
|
536 |
text-align: center;
|
537 |
padding: 20px;
|
|
|
553 |
</p>
|
554 |
</div>
|
555 |
""")
|
556 |
+
|
557 |
# 創建用戶偏好對象
|
558 |
user_prefs = UserPreferences(
|
559 |
living_space=args[0],
|
|
|
603 |
results=history_results
|
604 |
)
|
605 |
|
606 |
+
# 返回最終結果
|
607 |
return format_recommendation_html(recommendations, is_description_search=False)
|
608 |
|
609 |
except Exception as e:
|