Omnibus commited on
Commit
500a5b0
1 Parent(s): 7e2e851

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -17
app.py CHANGED
@@ -1,25 +1,10 @@
1
  import gradio as gr
2
 
3
- #sky = "https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/sky.png"
4
- sky="https%3A%2F%2Fhuggingface.co%2Fspaces%2FOmnibus%2Fgame-test%2Fresolve%2Fmain%2Fassets%2Fsky.png"
5
  platform = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/platform.png'
6
  star = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/star.png'
7
  bomb = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/bomb.png'
8
  dude = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/dude.png'
9
- load_js=f"""
10
- var sky_img = {sky};
11
- var platform_img = {platform};
12
- var star_img = {star};
13
- var bomb_img = {bomb};
14
- var dude_img = {dude};
15
-
16
- let myIframe = document.getElementById("myIframe");
17
- let url_string = "https://omnibus-game-test-static.static.hf.space";
18
- let adsURL = url_string+"?sky="+sky_img+"&platform="+platform_img;
19
- console.log(adsURL);
20
- myIframe.src = adsURL;
21
- """
22
- # src="https://omnibus-game-test-static.static.hf.space?sky={sky}&platform={platform}&star={star}&bomb={bomb}&dude={dude}"
23
 
24
 
25
  html_mod=f"""
@@ -40,7 +25,7 @@ with open("tmp.html","r") as f:
40
  print(out)
41
 
42
  with gr.Blocks() as app:
43
- gr.HTML(out)
44
  btn=gr.Button()
45
  btn.click(None,None,None)
46
  app.launch()
 
1
  import gradio as gr
2
 
3
+ sky = "https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/sky.png"
 
4
  platform = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/platform.png'
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
 
9
 
10
  html_mod=f"""
 
25
  print(out)
26
 
27
  with gr.Blocks() as app:
28
+ gr.HTML(html_mod)
29
  btn=gr.Button()
30
  btn.click(None,None,None)
31
  app.launch()