umair894 commited on
Commit
714e389
1 Parent(s): 4c09a77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -3
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
- footer{display:none !important}
 
 
 
22
  """
23
- with gr.Blocks(css=css) as demo:
 
 
 
 
 
 
 
 
 
 
 
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)