nihalaninihal commited on
Commit
ca88c10
·
1 Parent(s): 500061c

Fix theme in Blocks constructor for HF Spaces compatibility

Browse files

Pass theme=SentinelTheme() and css=CUSTOM_CSS directly in gr.Blocks()
constructor instead of only in __main__ block. HF Spaces needs theme
in the constructor to apply it correctly.

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -121,7 +121,7 @@ def inspect_state(seed):
121
  # Gradio UI
122
  # -------------------------------------------------------------------
123
 
124
- with gr.Blocks(title="SentinelOps Arena", fill_width=True) as demo:
125
 
126
  # Header banner
127
  gr.HTML(HEADER_HTML)
 
121
  # Gradio UI
122
  # -------------------------------------------------------------------
123
 
124
+ with gr.Blocks(title="SentinelOps Arena", fill_width=True, theme=SentinelTheme(), css=CUSTOM_CSS) as demo:
125
 
126
  # Header banner
127
  gr.HTML(HEADER_HTML)