Spaces:
Sleeping
Sleeping
Embedding Explorer: force light mode via gr.HTML (head doesn't execute on HF)
Browse files
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 "
|