coastguard / main.py
ianluo's picture
update
92df6d7
raw
history blame
335 Bytes
from fastapi import FastAPI
app = FastAPI()
app.mount("/", StaticFiles(directory="static", html=True), name="static")
@app.get("/")
def index() -> FileResponse:
return FileResponse(path="/static/index.html", media_type="text/html")
def t5(input):
output = pipe_flan(input)
return {"output": output[0]["generated_text"]}