DawnC commited on
Commit
3f0bcaf
1 Parent(s): 08ad9f2

Update breed_recommendation.py

Browse files
Files changed (1) hide show
  1. breed_recommendation.py +1 -16
breed_recommendation.py CHANGED
@@ -88,7 +88,7 @@ def create_recommendation_tab(UserPreferences, get_breed_recommendations, format
88
  description_input, description_search_btn, description_output, loading_msg = create_description_search_tab()
89
 
90
 
91
- async def on_find_match_click(*args):
92
  try:
93
  user_prefs = UserPreferences(
94
  living_space=args[0],
@@ -137,21 +137,6 @@ def create_recommendation_tab(UserPreferences, get_breed_recommendations, format
137
  import traceback
138
  print(traceback.format_exc())
139
  return "Error getting recommendations"
140
-
141
- # 使用 async 和 queue=True
142
- get_recommendations_btn.click(
143
- fn=on_find_match_click,
144
- inputs=[
145
- living_space,
146
- exercise_time,
147
- grooming_commitment,
148
- experience_level,
149
- has_children,
150
- noise_tolerance
151
- ],
152
- outputs=recommendation_output,
153
- queue=True
154
- )
155
 
156
 
157
  def on_description_search(description: str):
 
88
  description_input, description_search_btn, description_output, loading_msg = create_description_search_tab()
89
 
90
 
91
+ def on_find_match_click(*args):
92
  try:
93
  user_prefs = UserPreferences(
94
  living_space=args[0],
 
137
  import traceback
138
  print(traceback.format_exc())
139
  return "Error getting recommendations"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
 
141
 
142
  def on_description_search(description: str):