Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,19 @@ platform = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/
|
|
5 |
star = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/star.png'
|
6 |
bomb = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/bomb.png'
|
7 |
dude = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/dude.png'
|
8 |
-
load_js="""
|
9 |
-
|
10 |
-
|
11 |
-
}
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
with gr.Blocks() as app:
|
15 |
gr.HTML(f"""
|
|
|
5 |
star = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/star.png'
|
6 |
bomb = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/bomb.png'
|
7 |
dude = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/dude.png'
|
8 |
+
load_js=f"""
|
9 |
+
const sky_img = {sky};
|
10 |
+
const platform_img = {platform};
|
11 |
+
const star_img = {star};
|
12 |
+
const bomb_img = {bomb};
|
13 |
+
const dude_img = {dude};
|
14 |
+
|
15 |
+
let myIframe = document.getElementById("myIframe");
|
16 |
+
let url_string = "https://omnibus-game-test-static.static.hf.space";
|
17 |
+
let adsURL = url_string+"?sky="+sky_img+"&platform="+platform_img;
|
18 |
+
console.log(adsURL);
|
19 |
+
myIframe.src = adsURL;
|
20 |
+
"""
|
21 |
|
22 |
with gr.Blocks() as app:
|
23 |
gr.HTML(f"""
|