aicodingfun commited on
Commit
a577b50
·
verified ·
1 Parent(s): 087e783

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -100,7 +100,17 @@ with gr.Blocks(
100
  primary_hue="blue",
101
  secondary_hue="cyan",
102
  font=["Arial", "sans-serif"]
103
- )
 
 
 
 
 
 
 
 
 
 
104
  ) as app:
105
  gr.Markdown(f"""
106
  <div style='text-align: center; padding: 20px; color: white;'>
 
100
  primary_hue="blue",
101
  secondary_hue="cyan",
102
  font=["Arial", "sans-serif"]
103
+ ),
104
+ js="""
105
+ function refresh() {
106
+ const url = new URL(window.location);
107
+
108
+ if (url.searchParams.get('__theme') !== 'dark') {
109
+ url.searchParams.set('__theme', 'dark');
110
+ window.location.href = url.href;
111
+ }
112
+ }
113
+ """
114
  ) as app:
115
  gr.Markdown(f"""
116
  <div style='text-align: center; padding: 20px; color: white;'>