multimodalart HF Staff commited on
Commit
1889dd6
·
verified ·
1 Parent(s): 5e8c6f9

Gradio 6 takes theme/css on launch()

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -963,7 +963,7 @@ EXAMPLES = [
963
  ],
964
  ]
965
 
966
- with gr.Blocks(title="H3-World", css=CSS, theme=gr.themes.Citrus()) as demo:
967
  gr.Markdown(INTRO)
968
 
969
  with gr.Row(equal_height=False):
@@ -1034,4 +1034,11 @@ with gr.Blocks(title="H3-World", css=CSS, theme=gr.themes.Citrus()) as demo:
1034
  load_models()
1035
 
1036
  if __name__ == "__main__":
1037
- demo.launch(show_error=True, mcp_server=True, allowed_paths=[OUTPUT_DIR])
 
 
 
 
 
 
 
 
963
  ],
964
  ]
965
 
966
+ with gr.Blocks(title="H3-World") as demo:
967
  gr.Markdown(INTRO)
968
 
969
  with gr.Row(equal_height=False):
 
1034
  load_models()
1035
 
1036
  if __name__ == "__main__":
1037
+ # Gradio 6 takes `theme` / `css` on `launch()`, not on the `Blocks` constructor.
1038
+ demo.launch(
1039
+ theme=gr.themes.Citrus(),
1040
+ css=CSS,
1041
+ show_error=True,
1042
+ mcp_server=True,
1043
+ allowed_paths=[OUTPUT_DIR],
1044
+ )