DawnC commited on
Commit
df9870e
1 Parent(s): 59f3ffe

Update breed_recommendation.py

Browse files
Files changed (1) hide show
  1. breed_recommendation.py +0 -12
breed_recommendation.py CHANGED
@@ -117,21 +117,9 @@ def create_recommendation_tab(UserPreferences, get_breed_recommendations, format
117
 
118
  def on_description_search(description: str):
119
  try:
120
- # 1. 檢查導入的模組
121
- print("Checking imports...")
122
- print(f"breed_health_info available: {breed_health_info is not None}")
123
- print(f"breed_noise_info available: {breed_noise_info is not None}")
124
- print(f"dog_data available: {len(dog_data) if dog_data else None}")
125
-
126
- # 2. 初始化 matcher
127
- print("Initializing matcher...")
128
  matcher = SmartBreedMatcher(dog_data)
129
-
130
- # 3. 獲取推薦
131
- print(f"Getting recommendations for: {description}")
132
  breed_recommendations = matcher.match_user_preference(description, top_n=10)
133
 
134
- # 4. 建立 user_prefs
135
  print("Creating user preferences...")
136
  user_prefs = UserPreferences(
137
  living_space="apartment" if "apartment" in description.lower() else "house_small",
 
117
 
118
  def on_description_search(description: str):
119
  try:
 
 
 
 
 
 
 
 
120
  matcher = SmartBreedMatcher(dog_data)
 
 
 
121
  breed_recommendations = matcher.match_user_preference(description, top_n=10)
122
 
 
123
  print("Creating user preferences...")
124
  user_prefs = UserPreferences(
125
  living_space="apartment" if "apartment" in description.lower() else "house_small",