import gradio as gr sky = "https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/sky.png" platform = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/platform.png' star = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/star.png' bomb = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/bomb.png' dude = 'https://huggingface.co/spaces/Omnibus/game-test/resolve/main/assets/dude.png' load_js=f""" const sky_img = {sky}; const platform_img = {platform}; const star_img = {star}; const bomb_img = {bomb}; const dude_img = {dude}; let myIframe = document.getElementById("myIframe"); let url_string = "https://omnibus-game-test-static.static.hf.space"; let adsURL = url_string+"?sky="+sky_img+"&platform="+platform_img; console.log(adsURL); myIframe.src = adsURL; """ with gr.Blocks() as app: gr.HTML(f"""
""") btn=gr.Button() btn.click(None,None,None,_js=load_js) app.launch()