TestingAssist / app.py
thechaiexperiment's picture
Update app.py
aa0388b verified
raw
history blame
412 Bytes
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)