chyams Claude Opus 4.6 commited on
Commit
e2e24b5
·
1 Parent(s): f0dc59b

Embedding Explorer: force light mode via gr.HTML (head doesn't execute on HF)

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -784,6 +784,11 @@ THEME = gr.themes.Soft(
784
 
785
  with gr.Blocks(title="Embedding Explorer", theme=THEME, css=CSS, head=FORCE_LIGHT) as demo:
786
 
 
 
 
 
 
787
  gr.Markdown(
788
  "# Embedding Explorer\n"
789
  "Words in AI models are stored as **vectors** — long lists of numbers "
 
784
 
785
  with gr.Blocks(title="Embedding Explorer", theme=THEME, css=CSS, head=FORCE_LIGHT) as demo:
786
 
787
+ # Force light mode — head param doesn't execute on HF Spaces
788
+ gr.HTML('<script>if(!location.search.includes("__theme=light"))'
789
+ '{const u=new URL(location);u.searchParams.set("__theme","light");'
790
+ 'location.replace(u)}</script>')
791
+
792
  gr.Markdown(
793
  "# Embedding Explorer\n"
794
  "Words in AI models are stored as **vectors** — long lists of numbers "