Spaces:
Runtime error
Runtime error
File size: 386 Bytes
647e934 058b118 647e934 058b118 8b8c6e2 5042f1a | 1 2 3 4 5 6 7 8 9 10 11 12 13 | 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
) |