DawnC commited on
Commit
4511896
1 Parent(s): ca8bd21

Update breed_comparison.py

Browse files
Files changed (1) hide show
  1. breed_comparison.py +4 -1
breed_comparison.py CHANGED
@@ -8,7 +8,10 @@ from breed_noise_info import breed_noise_info
8
  def create_comparison_tab(dog_breeds, get_dog_description, breed_noise_info, breed_health_info):
9
  breed_display_mapping = { breed: breed.replace('_', ' ').title() for breed in dog_breeds}
10
  reversed_mapping = {v: k for k ,v in breed_display_mapping.items()}
11
- sorted_display_names = sorted(breed_display_mapping.values(), key=str.lower())
 
 
 
12
 
13
  with gr.TabItem("Breed Comparison"):
14
  gr.HTML("<p style='text-align: center;'>Select two dog breeds to compare their characteristics and care requirements.</p>")
 
8
  def create_comparison_tab(dog_breeds, get_dog_description, breed_noise_info, breed_health_info):
9
  breed_display_mapping = { breed: breed.replace('_', ' ').title() for breed in dog_breeds}
10
  reversed_mapping = {v: k for k ,v in breed_display_mapping.items()}
11
+
12
+ def sort_key(x):
13
+ return x.lower()
14
+ sorted_display_names = sorted(breed_display_mapping.values(), key=sort_key)
15
 
16
  with gr.TabItem("Breed Comparison"):
17
  gr.HTML("<p style='text-align: center;'>Select two dog breeds to compare their characteristics and care requirements.</p>")