docs-qa-backend / app.py
capcut8128's picture
Update app.py
5042f1a verified
Raw History Blame Contribute Delete
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
)