File size: 611 Bytes
c44aa0e
 
 
803253b
c44aa0e
 
 
35b1a76
 
 
 
 
 
 
c44aa0e
803253b
 
c44aa0e
42b3923
 
 
 
 
c44aa0e
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
"""Hugging Face Gradio entrypoint; no GPU reservation or paid hardware required."""

import os
import spaces
import uvicorn
from rubric_app.gradio_host import create_space_app


@spaces.GPU
def zero_gpu_compatibility_marker():
    """Declared for ZeroGPU platform validation; never called by this API-only app."""
    return "unused"


if __name__ == "__main__":
    if spaces.config.Config.zero_gpu:
        spaces.zero.startup()
    uvicorn.run(
        create_space_app(),
        host="0.0.0.0",
        port=int(os.environ.get("PORT", "7860")),
        proxy_headers=False,
        access_log=False,
    )