summaryapi / main.py
quyip
fix
d57b505
raw
history blame
331 Bytes
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
@app.get("/")
async def root():
return {"message": "Hello World"}
class SummaryReq(BaseModel):
text: str
key: str
@app.post("/summary/")
async def summary(request: SummaryReq):
print('=============')
print(request)
return ''