Spaces:
Sleeping
Sleeping
File size: 797 Bytes
270736b 184461c 270736b 3c36fb5 270736b 184461c 270736b bfe9fac 270736b d428744 c5bb903 3c36fb5 270736b 6e43888 270736b 8335d5c |
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 26 |
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)
|