Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -517,16 +517,16 @@ def generate_final_response(prompt, history, context_files=[], ticker_stats=[],
|
|
517 |
|
518 |
theme ="JohnSmith9982/small_and_pretty"
|
519 |
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
|
531 |
my_chatbot = gr.Chatbot(
|
532 |
label="Ask Anything",
|
@@ -554,7 +554,7 @@ fn=generate_final_response,
|
|
554 |
chatbot=my_chatbot,
|
555 |
title = '<h1 style="color: #FFFFFF; font-weight: bold; font-family: \'Arial\', sans-serif; text-align: center;">StockX</h1>',
|
556 |
theme=theme,
|
557 |
-
|
558 |
css = """.gradio-container {
|
559 |
background-image: url('https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/db907386019783.5d8cd86e1ce2b.jpg');
|
560 |
background-size: auto;
|
|
|
517 |
|
518 |
theme ="JohnSmith9982/small_and_pretty"
|
519 |
|
520 |
+
js_func = """
|
521 |
+
function refresh() {
|
522 |
+
const url = new URL(window.location);
|
523 |
+
|
524 |
+
if (url.searchParams.get('__theme') !== 'dark') {
|
525 |
+
url.searchParams.set('__theme', 'dark');
|
526 |
+
window.location.href = url.href;
|
527 |
+
}
|
528 |
+
}
|
529 |
+
"""
|
530 |
|
531 |
my_chatbot = gr.Chatbot(
|
532 |
label="Ask Anything",
|
|
|
554 |
chatbot=my_chatbot,
|
555 |
title = '<h1 style="color: #FFFFFF; font-weight: bold; font-family: \'Arial\', sans-serif; text-align: center;">StockX</h1>',
|
556 |
theme=theme,
|
557 |
+
js= js_func,
|
558 |
css = """.gradio-container {
|
559 |
background-image: url('https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/db907386019783.5d8cd86e1ce2b.jpg');
|
560 |
background-size: auto;
|