DawnC commited on
Commit
6a85ceb
β€’
1 Parent(s): fb2b64c

Update breed_recommendation.py

Browse files
Files changed (1) hide show
  1. breed_recommendation.py +9 -8
breed_recommendation.py CHANGED
@@ -1,7 +1,5 @@
1
  import sqlite3
2
  import gradio as gr
3
- import asyncio
4
- import itertools
5
  from typing import Generator
6
  from dog_database import get_dog_description, dog_data
7
  from breed_health_info import breed_health_info
@@ -26,10 +24,17 @@ def create_custom_button_style():
26
  width: 100%;
27
  margin: 20px 0;
28
  font-size: 1.1em;
 
 
29
  }
30
  #find-match-btn:hover {
 
31
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
32
- opacity: 0.95;
 
 
 
 
33
  }
34
  #search-status {
35
  text-align: center;
@@ -267,7 +272,7 @@ def create_recommendation_tab(UserPreferences, get_breed_recommendations, format
267
 
268
  return [
269
  format_recommendation_html(recommendations, is_description_search=False),
270
- gr.HTML.update(visible=False) # ιš±θ—ζœε°‹η‹€ζ…‹
271
  ]
272
 
273
  except Exception as e:
@@ -283,10 +288,6 @@ def create_recommendation_tab(UserPreferences, get_breed_recommendations, format
283
  ]
284
 
285
  get_recommendations_btn.click(
286
- fn=update_status_and_process, # ε…ˆζ›΄ζ–°η‹€ζ…‹
287
- outputs=[recommendation_output, search_status],
288
- queue=False # η’ΊδΏη«‹ε³εŸ·θ‘Œ
289
- ).then( # η„ΆεΎŒεŸ·θ‘ŒδΈ»θ¦θ™•η†
290
  fn=on_find_match_click,
291
  inputs=[
292
  living_space,
 
1
  import sqlite3
2
  import gradio as gr
 
 
3
  from typing import Generator
4
  from dog_database import get_dog_description, dog_data
5
  from breed_health_info import breed_health_info
 
24
  width: 100%;
25
  margin: 20px 0;
26
  font-size: 1.1em;
27
+ position: relative;
28
+ overflow: hidden;
29
  }
30
  #find-match-btn:hover {
31
+ background: linear-gradient(90deg, #ff4f5d 0%, #ffb361 100%);
32
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
33
+ transform: translateY(-1px);
34
+ }
35
+ #find-match-btn:active {
36
+ transform: translateY(1px);
37
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
38
  }
39
  #search-status {
40
  text-align: center;
 
272
 
273
  return [
274
  format_recommendation_html(recommendations, is_description_search=False),
275
+ gr.HTML.update(visible=True) # ιš±θ—ζœε°‹η‹€ζ…‹
276
  ]
277
 
278
  except Exception as e:
 
288
  ]
289
 
290
  get_recommendations_btn.click(
 
 
 
 
291
  fn=on_find_match_click,
292
  inputs=[
293
  living_space,