Jasonkim8652 commited on
Commit
968a76b
Β·
verified Β·
1 Parent(s): c5e9284

fix: move theme/css from launch() to Blocks() for gradio 5.x compat

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -836,7 +836,10 @@ def create_app() -> gr.Blocks:
836
  def _choice_val(idx: int) -> str:
837
  return agent_choices[min(idx, len(agent_choices) - 1)][1]
838
 
839
- with gr.Blocks() as app:
 
 
 
840
 
841
  gr.HTML(build_header(data["last_updated"], len(entries)))
842
 
@@ -1334,7 +1337,4 @@ def create_app() -> gr.Blocks:
1334
  # ═══════════════════════════════════════════════════════════════════
1335
 
1336
  if __name__ == "__main__":
1337
- create_app().launch(
1338
- theme=gr.themes.Soft(primary_hue="blue"),
1339
- css=CUSTOM_CSS,
1340
- )
 
836
  def _choice_val(idx: int) -> str:
837
  return agent_choices[min(idx, len(agent_choices) - 1)][1]
838
 
839
+ with gr.Blocks(
840
+ theme=gr.themes.Soft(primary_hue="blue"),
841
+ css=CUSTOM_CSS,
842
+ ) as app:
843
 
844
  gr.HTML(build_header(data["last_updated"], len(entries)))
845
 
 
1337
  # ═══════════════════════════════════════════════════════════════════
1338
 
1339
  if __name__ == "__main__":
1340
+ create_app().launch()