Spaces:
Runtime error
Runtime error
Download app.py from capcut8128/docs-qa-backend: direct link, hf CLI and curl.
- Browser
- Download file 386 Bytes
-
https://huggingface.co/spaces/capcut8128/docs-qa-backend/resolve/main/app.py
- Command line
-
hf download hf://spaces/capcut8128/docs-qa-backend/app.py
-
curl -L -o app.py https://huggingface.co/spaces/capcut8128/docs-qa-backend/resolve/main/app.py
386 Bytes
| import gradio as gr | |
| from app.main import app as fastapi_app | |
| demo = gr.Interface(fn=lambda x: x, inputs="text", outputs="text") | |
| app = gr.mount_gradio_app(fastapi_app, demo, path="/ui") | |
| # Gradio SDK ko satisfy karo, lekin actual serve FastAPI kare | |
| demo.launch( | |
| server_name="0.0.0.0", | |
| server_port=7860, | |
| ssr_mode=False, | |
| prevent_thread_lock=True, # ← yeh important hai | |
| ) |