Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -17,10 +17,24 @@ def chat_response(message, history):
|
|
17 |
return response
|
18 |
css = """
|
19 |
label[data-testid="block-label"] {
|
20 |
-
display: none;
|
21 |
-
|
|
|
|
|
|
|
22 |
"""
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
chatbot = gr.ChatInterface(chat_response)
|
25 |
|
26 |
demo.launch(share=True)
|
|
|
17 |
return response
|
18 |
css = """
|
19 |
label[data-testid="block-label"] {
|
20 |
+
display: none !important;
|
21 |
+
}
|
22 |
+
footer {
|
23 |
+
display: none !important;
|
24 |
+
}
|
25 |
"""
|
26 |
+
|
27 |
+
js_func = """
|
28 |
+
function refresh() {
|
29 |
+
const url = new URL(window.location);
|
30 |
+
|
31 |
+
if (url.searchParams.get('__theme') !== 'dark') {
|
32 |
+
url.searchParams.set('__theme', 'dark');
|
33 |
+
window.location.href = url.href;
|
34 |
+
}
|
35 |
+
}
|
36 |
+
"""
|
37 |
+
with gr.Blocks(css=css, js = js_func) as demo:
|
38 |
chatbot = gr.ChatInterface(chat_response)
|
39 |
|
40 |
demo.launch(share=True)
|