Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,24 @@ def get_answer(selected_knowledge_base, question):
|
|
33 |
output = interpreter_assistant.invoke({"content": question})
|
34 |
response = output[0].content[0].text.value
|
35 |
return response
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
gr.Interface(
|
38 |
fn=get_answer,
|
39 |
css=css, js = js_func, theme="soft", # base. citrus. soft glass. ocean
|
|
|
33 |
output = interpreter_assistant.invoke({"content": question})
|
34 |
response = output[0].content[0].text.value
|
35 |
return response
|
36 |
+
css = """
|
37 |
+
label[data-testid="block-label"] {
|
38 |
+
display: none !important;
|
39 |
+
}
|
40 |
+
footer {
|
41 |
+
display: none !important;
|
42 |
+
}
|
43 |
+
"""
|
44 |
|
45 |
+
js_func = """
|
46 |
+
function refresh() {
|
47 |
+
const url = new URL(window.location);
|
48 |
+
if (url.searchParams.get('__theme') !== 'dark') {
|
49 |
+
url.searchParams.set('__theme', 'dark');
|
50 |
+
window.location.href = url.href;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
"""
|
54 |
gr.Interface(
|
55 |
fn=get_answer,
|
56 |
css=css, js = js_func, theme="soft", # base. citrus. soft glass. ocean
|