DawnC commited on
Commit
7993dfc
1 Parent(s): 4a7b2fe

Update breed_recommendation.py

Browse files
Files changed (1) hide show
  1. breed_recommendation.py +4 -4
breed_recommendation.py CHANGED
@@ -118,7 +118,7 @@ def create_recommendation_tab(UserPreferences, get_breed_recommendations, format
118
 
119
  def on_description_search(description: str):
120
  try:
121
- loading_info.update(visible=True)
122
  description_output.update(visible=False)
123
 
124
  matcher = SmartBreedMatcher(dog_data)
@@ -199,13 +199,13 @@ def create_recommendation_tab(UserPreferences, get_breed_recommendations, format
199
  print(f"#{rec['rank']-1} score: {prev_score:.4f}")
200
  print(f"#{rec['rank']} score: {rec['final_score']:.4f}")
201
 
202
- loading_info.update(visible=False)
203
  description_output.update(visible=True)
204
 
205
  return format_recommendation_html(final_recommendations)
206
 
207
  except Exception as e:
208
- loading_info.update(visible=False)
209
  description_output.update(visible=True)
210
 
211
  import traceback
@@ -245,5 +245,5 @@ def create_recommendation_tab(UserPreferences, get_breed_recommendations, format
245
  'description_input': description_input,
246
  'description_search_btn': description_search_btn,
247
  'description_output': description_output,
248
- 'loading_info': loading_info
249
  }
 
118
 
119
  def on_description_search(description: str):
120
  try:
121
+ processing_message.update(visible=True)
122
  description_output.update(visible=False)
123
 
124
  matcher = SmartBreedMatcher(dog_data)
 
199
  print(f"#{rec['rank']-1} score: {prev_score:.4f}")
200
  print(f"#{rec['rank']} score: {rec['final_score']:.4f}")
201
 
202
+ processing_message.update(visible=False)
203
  description_output.update(visible=True)
204
 
205
  return format_recommendation_html(final_recommendations)
206
 
207
  except Exception as e:
208
+ processing_message.update(visible=False)
209
  description_output.update(visible=True)
210
 
211
  import traceback
 
245
  'description_input': description_input,
246
  'description_search_btn': description_search_btn,
247
  'description_output': description_output,
248
+ 'processing_message': processing_message
249
  }