Spaces:
Running on Zero
Running on Zero
Download app.py from Fairus/StepAudio-3-Music: direct link, hf CLI and curl.
- Browser
- Download file 838 Bytes
-
https://huggingface.co/spaces/Fairus/StepAudio-3-Music/resolve/main/app.py
- Command line
-
hf download hf://spaces/Fairus/StepAudio-3-Music/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Fairus/StepAudio-3-Music/resolve/main/app.py
838 Bytes
| """Host the original studio inside the managed Gradio runtime.""" | |
| import spaces | |
| import gradio as gr | |
| from server import app | |
| def _noop(): | |
| """Register the runtime; music generation calls only the remote API.""" | |
| return None | |
| with gr.Blocks() as demo: | |
| gr.HTML('<iframe src="/studio/app.html" title="StepAudio 3 Music Studio" style="position:fixed;inset:0;width:100%;height:100%;border:0;z-index:100;background:white"></iframe>') | |
| button = gr.Button(visible=False) | |
| button.click(_noop, inputs=None, outputs=None, api_visibility="private") | |
| if __name__ == "__main__": | |
| running_app, _, _ = demo.launch(server_name="0.0.0.0", server_port=7860, | |
| prevent_thread_lock=True, ssr_mode=False) | |
| running_app.router.routes[0:0] = app.router.routes | |
| demo.block_thread() | |