Ahmed-14 commited on
Commit
3a7b519
·
1 Parent(s): 145c7ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -11
app.py CHANGED
@@ -126,18 +126,14 @@ with gr.Blocks(theme='SebastianBravo/simci_css') as demo:
126
  clear.click(lambda: None, None, chatbot, queue=False)
127
 
128
 
129
- demo.launch()
130
- print(webbrowser.get())
131
  # handling dark_theme
132
 
 
 
 
133
 
 
 
134
 
135
- # def apply_dark_theme(url):
136
- # if not url.endswith('?__theme=dark'):
137
- # webbrowser.open_new(url + '?__theme=dark')
138
-
139
- # gradioURL = 'http://localhost:7860/'
140
- # apply_dark_theme(gradioURL)
141
-
142
- # if __name__ == "__main__":
143
- # demo.launch()
 
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()