File size: 412 Bytes
9481b36
 
 
 
 
 
75e444a
 
 
 
 
 
 
 
9481b36
75e444a
aa0388b
75e444a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os
from app.main import app
import uvicorn
from fastapi import FastAPI
app = FastAPI()

@app.get("/")
async def root():
    return {
        "name": "Test",
        "version": "1.0.0",
        "status": "running"
    }

if __name__ == "__main__":
    # Get port from environment variable (for Hugging Face Spaces)
    port = int(os.getenv("PORT", 7860))
    uvicorn.run(app, host="0.0.0.0", port=port)