Spaces:
Running
on
Zero
Running
on
Zero
Update breed_comparison.py
Browse files- breed_comparison.py +3 -10
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):
|
|
@@ -402,17 +402,10 @@ def create_comparison_tab(dog_breeds, get_dog_description, breed_noise_info, bre
|
|
| 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):
|
| 417 |
if not breed1 or not breed2:
|
| 418 |
return "Please select two breeds to compare"
|
|
|
|
| 42 |
value="Border_Collie"
|
| 43 |
)
|
| 44 |
|
| 45 |
+
compare_btn = gr.Button("Compare Breeds", elem_classes="custom-compare-button")
|
| 46 |
comparison_output = gr.HTML(label="Comparison Results")
|
| 47 |
|
| 48 |
def format_noise_data(notes):
|
|
|
|
| 402 |
transform: translateY(1px) !important;
|
| 403 |
box-shadow: 0 2px 4px rgba(66, 153, 225, 0.2) !important;
|
| 404 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 405 |
"""
|
| 406 |
|
| 407 |
+
gr.HTML(f"<style>{get_comparison_styles()}</style>")
|
| 408 |
+
|
| 409 |
def show_comparison(breed1, breed2):
|
| 410 |
if not breed1 or not breed2:
|
| 411 |
return "Please select two breeds to compare"
|