File size: 540 Bytes
1103f3b
155974e
 
 
1103f3b
155974e
1103f3b
 
 
 
 
155974e
1103f3b
 
155974e
1103f3b
155974e
1103f3b
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""Deprecated Gradio UI — use React frontend + `python app.py` / uvicorn instead."""

from __future__ import annotations

import warnings

warnings.warn(
    "app.ui (Gradio) is deprecated. Run `python app.py` to serve the React UI + API.",
    DeprecationWarning,
    stacklevel=2,
)

if __name__ == "__main__":
    import os

    import uvicorn

    host = os.environ.get("HOST", "0.0.0.0")
    port = int(os.environ.get("PORT", "7860") or "7860")
    uvicorn.run("app.main:app", host=host, port=port, reload=False)