wanghao76 commited on
Commit
a8c7472
·
1 Parent(s): 6270d91

fix: adapt app.py for Gradio 6.x API (remove Chatbot type, move theme/css to launch)

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -1758,12 +1758,8 @@ def build_app() -> gr.Blocks:
1758
 
1759
  with gr.Blocks(
1760
  title="StoryWeaver - 交互式叙事系统",
1761
- theme=gr.themes.Soft(
1762
- primary_hue="emerald",
1763
- secondary_hue="blue",
1764
- ),
1765
- css=APP_UI_CSS,
1766
  ) as app:
 
1767
 
1768
  gr.Markdown(
1769
  """
@@ -1807,7 +1803,6 @@ def build_app() -> gr.Blocks:
1807
  chatbot = gr.Chatbot(
1808
  label="故事",
1809
  height=480,
1810
- type="messages",
1811
  )
1812
 
1813
  location_map_panel = gr.Markdown(
@@ -2001,5 +1996,10 @@ if __name__ == "__main__":
2001
  server_port=7860,
2002
  share=False,
2003
  show_error=True,
 
 
 
 
 
2004
  allowed_paths=[str(IMAGE_DIR)],
2005
  )
 
1758
 
1759
  with gr.Blocks(
1760
  title="StoryWeaver - 交互式叙事系统",
 
 
 
 
 
1761
  ) as app:
1762
+ app.css = APP_UI_CSS
1763
 
1764
  gr.Markdown(
1765
  """
 
1803
  chatbot = gr.Chatbot(
1804
  label="故事",
1805
  height=480,
 
1806
  )
1807
 
1808
  location_map_panel = gr.Markdown(
 
1996
  server_port=7860,
1997
  share=False,
1998
  show_error=True,
1999
+ theme=gr.themes.Soft(
2000
+ primary_hue="emerald",
2001
+ secondary_hue="blue",
2002
+ ),
2003
+ css=APP_UI_CSS,
2004
  allowed_paths=[str(IMAGE_DIR)],
2005
  )