Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,25 @@ def chat_response(message, history):
|
|
11 |
output = interpreter_assistant.invoke({"content": message})
|
12 |
response = output[0].content[0].text.value
|
13 |
return response
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
chatbot = gr.ChatInterface(chat_response,title="ProjSite")
|
17 |
|
18 |
demo.launch(share=True)
|
|
|
11 |
output = interpreter_assistant.invoke({"content": message})
|
12 |
response = output[0].content[0].text.value
|
13 |
return response
|
14 |
+
css = """
|
15 |
+
label[data-testid="block-label"] {
|
16 |
+
display: none !important;
|
17 |
+
}
|
18 |
+
footer {
|
19 |
+
display: none !important;
|
20 |
+
}
|
21 |
+
"""
|
22 |
|
23 |
+
js_func = """
|
24 |
+
function refresh() {
|
25 |
+
const url = new URL(window.location);
|
26 |
+
if (url.searchParams.get('__theme') !== 'dark') {
|
27 |
+
url.searchParams.set('__theme', 'dark');
|
28 |
+
window.location.href = url.href;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
"""
|
32 |
+
with gr.Blocks(css=css, js = js_func, theme="monochrome") as demo:
|
33 |
chatbot = gr.ChatInterface(chat_response,title="ProjSite")
|
34 |
|
35 |
demo.launch(share=True)
|