Shufan Li commited on
Commit
9c070e6
·
1 Parent(s): d731641

update html

Browse files
Files changed (1) hide show
  1. index.html +13 -1
index.html CHANGED
@@ -7,6 +7,18 @@
7
  <link rel="stylesheet" href="style.css" />
8
  </head>
9
  <body>
10
- <iframe src="https://4ddb1fdef592512d62.gradio.live" height="1024px" width="100%"/>
11
  </body>
 
 
 
 
 
 
 
 
 
 
 
 
12
  </html>
 
7
  <link rel="stylesheet" href="style.css" />
8
  </head>
9
  <body>
10
+ <iframe id="demoFrame" height="1024px" width="100%"/>
11
  </body>
12
+ <script>
13
+ document.addEventListener("DOMContentLoaded", function () {
14
+ // Fetch the iframe element
15
+ const iframe = document.getElementById("demoFrame");
16
+ // Set the src attribute to the value of window.huggingface.variables['DEMO_URL']
17
+ if (window.huggingface && window.huggingface.variables['DEMO_URL']) {
18
+ iframe.src = window.huggingface.variables['DEMO_URL'];
19
+ } else {
20
+ console.error("DEMO_URL not found in window.huggingface.variables");
21
+ }
22
+ });
23
+ </script>
24
  </html>