prithivMLmods commited on
Commit
b220bf2
·
verified ·
1 Parent(s): 80bede4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -23,15 +23,16 @@ footer {
23
  }
24
  '''
25
 
26
- #js_func = """
27
- #function refresh() {
28
- # const url = new URL(window.location);
29
- #if (url.searchParams.get('__theme') !== 'dark') {
30
- # url.searchParams.set('__theme', 'dark');
31
- # window.location.href = url.href;
32
- #}
33
- #}
34
- #"""
 
35
 
36
  examples = [
37
  "3d image, cute girl, in the style of Pixar --ar 1:2 --stylize 750, 4K resolution highlights, Sharp focus, octane render, ray tracing, Ultra-High-Definition, 8k, UHD, HDR, (Masterpiece:1.5), (best quality:1.5)",
@@ -149,7 +150,7 @@ def load_predefined_images():
149
  ]
150
  return predefined_images
151
 
152
- with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
153
  gr.Markdown(DESCRIPTIONx)
154
  with gr.Row():
155
  prompt = gr.Text(
 
23
  }
24
  '''
25
 
26
+ js_func = """
27
+ function refresh() {
28
+ const url = new URL(window.location);
29
+ if (url.searchParams.get('__theme') !== 'dark') {
30
+ url.searchParams.set('__theme', 'dark');
31
+ window.location.href = url.href;
32
+ }
33
+ }
34
+ """
35
+
36
 
37
  examples = [
38
  "3d image, cute girl, in the style of Pixar --ar 1:2 --stylize 750, 4K resolution highlights, Sharp focus, octane render, ray tracing, Ultra-High-Definition, 8k, UHD, HDR, (Masterpiece:1.5), (best quality:1.5)",
 
150
  ]
151
  return predefined_images
152
 
153
+ with gr.Blocks(css=css, theme="bethecloud/storj_theme", js=js_func) as demo:
154
  gr.Markdown(DESCRIPTIONx)
155
  with gr.Row():
156
  prompt = gr.Text(