SunderAli17 commited on
Commit
4557f66
·
verified ·
1 Parent(s): 8e6a39d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -147,7 +147,17 @@ examples = [
147
  theme = gr.themes.Base(
148
  font=[gr.themes.GoogleFont('Libre Franklin'), gr.themes.GoogleFont('Public Sans'), 'system-ui', 'sans-serif'],
149
  )
150
- with gr.Blocks(css="footer{display:none !important}", theme=theme) as demo:
 
 
 
 
 
 
 
 
 
 
151
  gr.Markdown(MARKDOWN)
152
  gr.DuplicateButton(
153
  value="Duplicate Space for private use",
 
147
  theme = gr.themes.Base(
148
  font=[gr.themes.GoogleFont('Libre Franklin'), gr.themes.GoogleFont('Public Sans'), 'system-ui', 'sans-serif'],
149
  )
150
+ js_func = """
151
+ function refresh() {
152
+ const url = new URL(window.location);
153
+
154
+ if (url.searchParams.get('__theme') !== 'dark') {
155
+ url.searchParams.set('__theme', 'dark');
156
+ window.location.href = url.href;
157
+ }
158
+ }
159
+ """
160
+ with gr.Blocks(js=js_func, theme=theme) as demo:
161
  gr.Markdown(MARKDOWN)
162
  gr.DuplicateButton(
163
  value="Duplicate Space for private use",