DawnC commited on
Commit
9981049
1 Parent(s): ceb207a

Update breed_comparison.py

Browse files
Files changed (1) hide show
  1. breed_comparison.py +40 -1
breed_comparison.py CHANGED
@@ -42,7 +42,7 @@ def create_comparison_tab(dog_breeds, get_dog_description, breed_noise_info, bre
42
  value="Border_Collie"
43
  )
44
 
45
- compare_btn = gr.Button("Compare Breeds")
46
  comparison_output = gr.HTML(label="Comparison Results")
47
 
48
  def format_noise_data(notes):
@@ -372,6 +372,45 @@ def create_comparison_tab(dog_breeds, get_dog_description, breed_noise_info, bre
372
  grid-template-columns: 1fr;
373
  }
374
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  """
376
 
377
  def show_comparison(breed1, breed2):
 
42
  value="Border_Collie"
43
  )
44
 
45
+ compare_btn = gr.Button("Compare Breeds", variant="primary", elem_classes="custom-compare-button")
46
  comparison_output = gr.HTML(label="Comparison Results")
47
 
48
  def format_noise_data(notes):
 
372
  grid-template-columns: 1fr;
373
  }
374
  }
375
+
376
+ .custom-compare-button {
377
+ background: linear-gradient(135deg, #4299e1, #48bb78) !important;
378
+ border: none !important;
379
+ padding: 12px 30px !important;
380
+ border-radius: 8px !important;
381
+ font-size: 1.1em !important;
382
+ font-weight: 600 !important;
383
+ color: white !important;
384
+ cursor: pointer !important;
385
+ transition: all 0.3s ease !important;
386
+ box-shadow: 0 4px 6px rgba(66, 153, 225, 0.2) !important;
387
+ margin: 20px auto !important;
388
+ display: block !important;
389
+ width: auto !important;
390
+ min-width: 200px !important;
391
+ text-transform: uppercase !important;
392
+ letter-spacing: 0.5px !important;
393
+ }
394
+
395
+ .custom-compare-button:hover {
396
+ transform: translateY(-2px) !important;
397
+ box-shadow: 0 6px 12px rgba(66, 153, 225, 0.3) !important;
398
+ background: linear-gradient(135deg, #48bb78, #4299e1) !important;
399
+ }
400
+
401
+ .custom-compare-button:active {
402
+ transform: translateY(1px) !important;
403
+ box-shadow: 0 2px 4px rgba(66, 153, 225, 0.2) !important;
404
+ }
405
+
406
+ /* 幫按鈕添加容器樣式 */
407
+ .button-container {
408
+ text-align: center;
409
+ padding: 20px 0;
410
+ background: linear-gradient(to right, rgba(66, 153, 225, 0.05), rgba(72, 187, 120, 0.05));
411
+ border-radius: 12px;
412
+ margin: 20px 0;
413
+ }
414
  """
415
 
416
  def show_comparison(breed1, breed2):