DawnC commited on
Commit
0d08081
·
1 Parent(s): d953d31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -19
app.py CHANGED
@@ -126,10 +126,6 @@ def preprocess_image(image):
126
  return transform(image).unsqueeze(0)
127
 
128
 
129
- # def get_akc_breeds_link():
130
- # return "https://www.akc.org/dog-breeds/"
131
-
132
-
133
  def get_akc_breeds_link(breed):
134
  base_url = "https://www.akc.org/dog-breeds/"
135
  breed_url = breed.lower().replace('_', '-')
@@ -380,21 +376,6 @@ def show_details_html(choice, previous_output, initial_state):
380
  return f"<p style='color: red;'>{error_msg}</p>", gr.update(visible=True), initial_state
381
 
382
 
383
- # def format_description_html(description, breed):
384
- # html = "<ul style='list-style-type: none; padding-left: 0;'>"
385
- # if isinstance(description, dict):
386
- # for key, value in description.items():
387
- # html += f"<li style='margin-bottom: 10px;'><strong>{key}:</strong> {value}</li>"
388
- # elif isinstance(description, str):
389
- # html += f"<li>{description}</li>"
390
- # else:
391
- # html += f"<li>No description available for {breed}</li>"
392
- # html += "</ul>"
393
- # akc_link = get_akc_breeds_link()
394
- # html += f'<p><a href="{akc_link}" target="_blank">Learn more about {breed} on the AKC website</a></p>'
395
- # return html
396
-
397
-
398
  def format_description_html(description, breed):
399
  html = "<ul style='list-style-type: none; padding-left: 0;'>"
400
  if isinstance(description, dict):
 
126
  return transform(image).unsqueeze(0)
127
 
128
 
 
 
 
 
129
  def get_akc_breeds_link(breed):
130
  base_url = "https://www.akc.org/dog-breeds/"
131
  breed_url = breed.lower().replace('_', '-')
 
376
  return f"<p style='color: red;'>{error_msg}</p>", gr.update(visible=True), initial_state
377
 
378
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
379
  def format_description_html(description, breed):
380
  html = "<ul style='list-style-type: none; padding-left: 0;'>"
381
  if isinstance(description, dict):