ashu1069 commited on
Commit
b02cf03
·
1 Parent(s): 67b6521

inject CSS via inline <style> so it survives Spaces auto-launch

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -216,6 +216,7 @@ CSS = """
216
  """
217
 
218
  HERO_HTML = """
 
219
  <div id="hero">
220
  <span class="chip"><span class="dot"></span> Powered by Gemma 4 · On-device · CC0 Passport</span>
221
  <h1 style="margin-top:18px;">Material in. <em>Passport out.</em></h1>
@@ -236,7 +237,7 @@ def build_examples() -> list[list]:
236
 
237
 
238
  with gr.Blocks(title="Matter — Material Intelligence") as demo:
239
- gr.HTML(HERO_HTML)
240
 
241
  with gr.Row():
242
  with gr.Column(scale=5):
@@ -297,10 +298,4 @@ with gr.Blocks(title="Matter — Material Intelligence") as demo:
297
 
298
 
299
  if __name__ == "__main__":
300
- demo.queue(max_size=8).launch(
301
- server_name="0.0.0.0",
302
- show_error=True,
303
- css=CSS,
304
- theme=gr.themes.Base(),
305
- ssr_mode=False,
306
- )
 
216
  """
217
 
218
  HERO_HTML = """
219
+ <style>__MATTER_CSS__</style>
220
  <div id="hero">
221
  <span class="chip"><span class="dot"></span> Powered by Gemma 4 · On-device · CC0 Passport</span>
222
  <h1 style="margin-top:18px;">Material in. <em>Passport out.</em></h1>
 
237
 
238
 
239
  with gr.Blocks(title="Matter — Material Intelligence") as demo:
240
+ gr.HTML(HERO_HTML.replace("__MATTER_CSS__", CSS))
241
 
242
  with gr.Row():
243
  with gr.Column(scale=5):
 
298
 
299
 
300
  if __name__ == "__main__":
301
+ demo.queue(max_size=8).launch(server_name="0.0.0.0", show_error=True, ssr_mode=False)