Spaces:
Sleeping
Sleeping
Mount Respite API with Gradio UI
Browse files
app.py
CHANGED
|
@@ -227,6 +227,10 @@ with gr.Blocks(title="Stable Audio 3 Small") as demo:
|
|
| 227 |
)
|
| 228 |
|
| 229 |
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 227 |
)
|
| 228 |
|
| 229 |
|
| 230 |
+
# Mount the Gradio UI under the FastAPI application so API routes remain
|
| 231 |
+
# available at /api/* instead of being handled by Gradio's catch-all route.
|
| 232 |
+
app = gr.mount_gradio_app(api, demo, path="/")
|
| 233 |
+
|
| 234 |
+
if __name__ == "__main__":
|
| 235 |
+
import uvicorn
|
| 236 |
+
uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", "7860")))
|