Ahmed-14 commited on
Commit
0e2a654
1 Parent(s): 151d7d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -126,14 +126,15 @@ with gr.Blocks(theme='SebastianBravo/simci_css') as demo:
126
  clear.click(lambda: None, None, chatbot, queue=False)
127
 
128
 
 
 
 
129
  # handling dark_theme
130
 
131
  def apply_dark_theme(url):
132
  if not url.endswith('?__theme=dark'):
133
- webbrowser.open(url + '?__theme=dark')
134
 
135
  gradioURL = 'http://localhost:7860/'
136
  apply_dark_theme(gradioURL)
137
 
138
- if __name__ == "__main__":
139
- demo.launch()
 
126
  clear.click(lambda: None, None, chatbot, queue=False)
127
 
128
 
129
+ if __name__ == "__main__":
130
+ demo.launch()
131
+
132
  # handling dark_theme
133
 
134
  def apply_dark_theme(url):
135
  if not url.endswith('?__theme=dark'):
136
+ webbrowser.open(url + '?__theme=dark', new=0, autoraise=True)
137
 
138
  gradioURL = 'http://localhost:7860/'
139
  apply_dark_theme(gradioURL)
140