CoolFace
Apppublic

Coder19/interview_system

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
app.py35 linesDownload Raw Back to root
1from fastapi import FastAPI2from fastapi.middleware.cors import CORSMiddleware3import uvicorn4 5# Import your main application6from main import app as fastapi_app7 8# Create a new FastAPI app for Hugging Face Spaces9app = FastAPI()10 11# Configure CORS12app.add_middleware(13    CORSMiddleware,14    allow_origins=["*"],15    allow_credentials=True,16    allow_methods=["*"],17    allow_headers=["*"],18)19 20# Mount your existing FastAPI app21app.mount("/api", fastapi_app)22 23# Root endpoint24@app.get("/")25def read_root():26    return {"message": "AI Interview Bot API is running. Access the API at /api"}27 28# Health check endpoint29@app.get("/health")30def health_check():31    return {"status": "healthy"}32 33if __name__ == "__main__":34    uvicorn.run("app:app", host="0.0.0.0", port=7860, reload=True)35