File size: 529 Bytes
a4a5bdd
 
 
bde4c25
a4a5bdd
 
 
 
 
 
 
bde4c25
a4a5bdd
 
 
bde4c25
a4a5bdd
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
Sasya AI — Hugging Face Space entry point (Gradio SDK).

Works on CPU basic (recommended) and ZeroGPU (set USE_ZEROGPU=1).
"""

from __future__ import annotations

import gradio as gr

from app.main import app as fastapi_app
from gradio_ui import build_demo

demo = build_demo()

# Gradio UI at / ; REST API at /health, /chat, /docs, etc.
app = gr.mount_gradio_app(fastapi_app, demo, path="/")

if __name__ == "__main__":
    import uvicorn

    from app.config import PORT

    uvicorn.run(app, host="0.0.0.0", port=PORT)