DawnC commited on
Commit
63953fb
1 Parent(s): cf9ef94

Update breed_recommendation.py

Browse files
Files changed (1) hide show
  1. breed_recommendation.py +9 -2
breed_recommendation.py CHANGED
@@ -45,7 +45,8 @@ def create_custom_button_style():
45
  color: #666;
46
  margin: 10px 0;
47
  border-radius: 8px;
48
- background: rgba(255, 95, 109, 0.1);
 
49
  }
50
 
51
  /* 強制覆蓋任何其他樣式 */
@@ -289,9 +290,15 @@ def create_recommendation_tab(UserPreferences, get_breed_recommendations, format
289
  print(traceback.format_exc())
290
  return ["Error getting recommendations", gr.HTML.update(visible=False)]
291
 
 
 
 
 
 
 
292
  def update_status_and_process(*args):
293
  return [
294
- "", # 清空現有結果
295
  gr.update(visible=True)
296
  ]
297
 
 
45
  color: #666;
46
  margin: 10px 0;
47
  border-radius: 8px;
48
+ background: rgba(200, 200, 200, 0.1); # 中性的背景色
49
+ transition: opacity 0.3s ease; # 平滑過渡效果
50
  }
51
 
52
  /* 強制覆蓋任何其他樣式 */
 
290
  print(traceback.format_exc())
291
  return ["Error getting recommendations", gr.HTML.update(visible=False)]
292
 
293
+ # def update_status_and_process(*args):
294
+ # return [
295
+ # "", # 清空現有結果
296
+ # gr.update(visible=True)
297
+ # ]
298
+
299
  def update_status_and_process(*args):
300
  return [
301
+ gr.update(value=None, visible=True), # 更新可見性
302
  gr.update(visible=True)
303
  ]
304