prithivMLmods commited on
Commit
8db68ac
1 Parent(s): c2d3125

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -24,6 +24,17 @@ footer {
24
  '''
25
 
26
 
 
 
 
 
 
 
 
 
 
 
 
27
  examples = [
28
  "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)",
29
  "Chocolate dripping from a donut against a yellow background, in the style of brocore, hyper-realistic oil --ar 2:3 --q 2 --s 750 --v 5 --ar 2:3 --q 2 --s 750 --v 5",
@@ -140,7 +151,7 @@ def load_predefined_images():
140
  ]
141
  return predefined_images
142
 
143
- with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
144
  gr.Markdown(DESCRIPTIONx)
145
  with gr.Row():
146
  prompt = gr.Text(
 
24
  '''
25
 
26
 
27
+ js_func = """
28
+ function refresh() {
29
+ const url = new URL(window.location);
30
+ if (url.searchParams.get('__theme') !== 'dark') {
31
+ url.searchParams.set('__theme', 'dark');
32
+ window.location.href = url.href;
33
+ }
34
+ }
35
+ """
36
+
37
+
38
  examples = [
39
  "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)",
40
  "Chocolate dripping from a donut against a yellow background, in the style of brocore, hyper-realistic oil --ar 2:3 --q 2 --s 750 --v 5 --ar 2:3 --q 2 --s 750 --v 5",
 
151
  ]
152
  return predefined_images
153
 
154
+ with gr.Blocks(css=css, theme="bethecloud/storj_theme", js=js_func) as demo:
155
  gr.Markdown(DESCRIPTIONx)
156
  with gr.Row():
157
  prompt = gr.Text(