Spaces:
Sleeping
Sleeping
Update breed_comparison.py
Browse files- breed_comparison.py +4 -4
breed_comparison.py
CHANGED
@@ -18,12 +18,12 @@ def create_comparison_tab(dog_breeds, get_dog_description, breed_noise_info, bre
|
|
18 |
breed1_dropdown = gr.Dropdown(
|
19 |
choices=sorted_display_names,
|
20 |
label="Select First Breed",
|
21 |
-
value="
|
22 |
)
|
23 |
breed2_dropdown = gr.Dropdown(
|
24 |
choices=sorted_display_names,
|
25 |
label="Select Second Breed",
|
26 |
-
value="
|
27 |
)
|
28 |
|
29 |
compare_btn = gr.Button("Compare Breeds")
|
@@ -362,8 +362,8 @@ def create_comparison_tab(dog_breeds, get_dog_description, breed_noise_info, bre
|
|
362 |
if not breed1 or not breed2:
|
363 |
return "Please select two breeds to compare"
|
364 |
|
365 |
-
breed1 =
|
366 |
-
breed2 =
|
367 |
breed1_info = get_dog_description(breed1)
|
368 |
breed2_info = get_dog_description(breed2)
|
369 |
breed1_noise = breed_noise_info.get(breed1, {})
|
|
|
18 |
breed1_dropdown = gr.Dropdown(
|
19 |
choices=sorted_display_names,
|
20 |
label="Select First Breed",
|
21 |
+
value="Golden Retriever"
|
22 |
)
|
23 |
breed2_dropdown = gr.Dropdown(
|
24 |
choices=sorted_display_names,
|
25 |
label="Select Second Breed",
|
26 |
+
value="Border Collie"
|
27 |
)
|
28 |
|
29 |
compare_btn = gr.Button("Compare Breeds")
|
|
|
362 |
if not breed1 or not breed2:
|
363 |
return "Please select two breeds to compare"
|
364 |
|
365 |
+
breed1 = reversed_mapping[breed1_display]
|
366 |
+
breed2 = reversed_mapping[breed2_display]
|
367 |
breed1_info = get_dog_description(breed1)
|
368 |
breed2_info = get_dog_description(breed2)
|
369 |
breed1_noise = breed_noise_info.get(breed1, {})
|