DawnC commited on
Commit
345a03a
·
1 Parent(s): 75cb17a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -553,7 +553,7 @@ async def predict(image):
553
 
554
  dogs_info += '</div>'
555
 
556
- #dogs_info += buttons_html
557
 
558
  # html_output = f"""
559
  # <style>
@@ -575,8 +575,6 @@ async def predict(image):
575
  {buttons_html}
576
  """
577
 
578
-
579
-
580
  if buttons:
581
  html_output += """
582
  <script>
@@ -634,7 +632,7 @@ def show_details_html(choice, previous_output, initial_state):
634
  """
635
 
636
  initial_state["current_description"] = html_output
637
- #initial_state["original_buttons"] = initial_state.get("buttons", [])
638
 
639
  return html_output, gr.update(visible=True), initial_state
640
  except Exception as e:
@@ -659,7 +657,7 @@ def format_description_html(description, breed):
659
 
660
 
661
  def go_back(state):
662
- #buttons = state.get("buttons", [])
663
  return (
664
  state["html_output"],
665
  state["image"],
 
553
 
554
  dogs_info += '</div>'
555
 
556
+ dogs_info += buttons_html
557
 
558
  # html_output = f"""
559
  # <style>
 
575
  {buttons_html}
576
  """
577
 
 
 
578
  if buttons:
579
  html_output += """
580
  <script>
 
632
  """
633
 
634
  initial_state["current_description"] = html_output
635
+ initial_state["original_buttons"] = initial_state.get("buttons", [])
636
 
637
  return html_output, gr.update(visible=True), initial_state
638
  except Exception as e:
 
657
 
658
 
659
  def go_back(state):
660
+ buttons = state.get("buttons", [])
661
  return (
662
  state["html_output"],
663
  state["image"],