multimodalart HF staff commited on
Commit
9817ece
·
1 Parent(s): 3d7ac93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -392,14 +392,13 @@ with gr.Blocks(css="style.css") as demo:
392
  # <img src="https://iccv2023.thecvf.com/img/LogoICCV23V04.svg" width="400" style="margin: 0 auto;" />
393
  # ''', elem_id="iccv_logo")
394
 
395
- demo.load(
396
- None,
397
- _js='''let gradioURL = window.self.location.href;
398
- console.log(gradioURL);
399
- if (!gradioURL.endsWith('?__theme=dark')) {
400
- window.self.location.replace(gradioURL + '?__theme=dark');
401
- }
402
- '''
403
- )
404
  demo.queue()
405
  demo.launch()
 
392
  # <img src="https://iccv2023.thecvf.com/img/LogoICCV23V04.svg" width="400" style="margin: 0 auto;" />
393
  # ''', elem_id="iccv_logo")
394
 
395
+ demo.load(None,
396
+ _js="""async () => {
397
+ let gradioURL = window.self.location.href;
398
+ console.log(gradioURL);
399
+ if (!gradioURL.endsWith("?__theme=dark")) {
400
+ window.self.location.replace(gradioURL + "?__theme=dark");
401
+ }
402
+ }""")
 
403
  demo.queue()
404
  demo.launch()