Spaces:
Paused
Paused
ranamhamoud
commited on
Commit
โข
70579dc
1
Parent(s):
77e9b56
Update app.py
Browse files
app.py
CHANGED
@@ -165,9 +165,18 @@ chat_interface = gr.ChatInterface(
|
|
165 |
],
|
166 |
theme='shivi/calm_seafoam',autofocus=True,
|
167 |
)
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
# Gradio Web Interface
|
170 |
-
with gr.Blocks(css=custom_css,fill_height=True) as demo:
|
171 |
chat_interface.render()
|
172 |
|
173 |
# gr.Markdown(LICENSE)
|
|
|
165 |
],
|
166 |
theme='shivi/calm_seafoam',autofocus=True,
|
167 |
)
|
168 |
+
js_func = """
|
169 |
+
function refresh() {
|
170 |
+
const url = new URL(window.location);
|
171 |
+
|
172 |
+
if (url.searchParams.get('__theme') !== 'dark') {
|
173 |
+
url.searchParams.set('__theme', 'dark');
|
174 |
+
window.location.href = url.href;
|
175 |
+
}
|
176 |
+
}
|
177 |
+
"""
|
178 |
# Gradio Web Interface
|
179 |
+
with gr.Blocks(css=custom_css,fill_height=True,js=js_func) as demo:
|
180 |
chat_interface.render()
|
181 |
|
182 |
# gr.Markdown(LICENSE)
|