import uvicorn import os from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from routers import get_transcript, get_chatrespone, get_transcript_transformer, get_transcript_gradio os.environ['HF_HOME'] = "./cached/" app = FastAPI() app.add_middleware(CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["Content-Type", "Authorization", "x-api-key"]) app.include_router(get_transcript.router) app.include_router(get_chatrespone.router) app.include_router(get_transcript_transformer.router) app.include_router(get_transcript_gradio.router) @app.get("/") def read_root(): return {"message": "This is from python backend cache... test here"} if __name__ == '__main__': uvicorn.run( "app:app", reload=True)