DawnC commited on
Commit
75cb17a
·
1 Parent(s): 900a9cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -634,7 +634,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,10 +659,9 @@ 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["dogs_info"], # 這裡應該是完整的 HTML 內容
666
  state["image"],
667
  gr.update(visible=True, choices=buttons),
668
  gr.update(visible=False),
 
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
 
660
 
661
  def go_back(state):
662
+ #buttons = state.get("buttons", [])
663
  return (
664
  state["html_output"],
 
665
  state["image"],
666
  gr.update(visible=True, choices=buttons),
667
  gr.update(visible=False),