ODIN Claude Sonnet 4.6 commited on
Commit
bf4800a
·
1 Parent(s): 613c1f9

Fix UI: move theme+CSS into gr.Blocks() so they apply regardless of launch method

Browse files

Theme and CSS were previously only passed to launch() which was lost during
the HF Spaces refactor. Moving them into build_app() fixes local + HF runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. src/agents/app.py +9 -7
src/agents/app.py CHANGED
@@ -948,7 +948,13 @@ def clear_session():
948
  # ─────────────────────────────────────────────────────────────────────────────
949
 
950
  def build_app():
951
- with gr.Blocks(title="Odin — Drilling Intelligence") as app:
 
 
 
 
 
 
952
 
953
  answer_state = gr.State(None) # holds export payload dict
954
 
@@ -1063,9 +1069,5 @@ demo, _figures_dir = _make_demo()
1063
 
1064
 
1065
  if __name__ == "__main__":
1066
- demo.launch(
1067
- server_name="0.0.0.0",
1068
- server_port=7860,
1069
- share=False,
1070
- allowed_paths=[str(_figures_dir)],
1071
- )
 
948
  # ─────────────────────────────────────────────────────────────────────────────
949
 
950
  def build_app():
951
+ _theme = gr.themes.Soft(
952
+ primary_hue="emerald",
953
+ secondary_hue="slate",
954
+ neutral_hue="slate",
955
+ font=gr.themes.GoogleFont("Inter"),
956
+ )
957
+ with gr.Blocks(title="Odin — Drilling Intelligence", theme=_theme, css=CUSTOM_CSS) as app:
958
 
959
  answer_state = gr.State(None) # holds export payload dict
960
 
 
1069
 
1070
 
1071
  if __name__ == "__main__":
1072
+ demo.launch(server_name="0.0.0.0", server_port=7860, share=False,
1073
+ allowed_paths=[str(_figures_dir)])