prithivMLmods commited on
Commit
2548094
·
verified ·
1 Parent(s): 6012f8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -34,14 +34,11 @@ def check_text(prompt, negative=""):
34
 
35
  js_func = """
36
 
37
- function setThemeOnLoad() {
38
- const url = new URL(window.location.href);
39
- const currentTheme = url.searchParams.get('__theme');
40
-
41
- if (currentTheme === 'dark') {
42
- applyDarkTheme();
43
- } else {
44
- applyLightTheme();
45
  }
46
  }
47
 
 
34
 
35
  js_func = """
36
 
37
+ function refresh() {
38
+ const url = new URL(window.location);
39
+ if (url.searchParams.get('__theme') !== 'dark') {
40
+ url.searchParams.set('__theme', 'dark');
41
+ window.location.href = url.href;
 
 
 
42
  }
43
  }
44