File size: 380 Bytes
eed9cc2
6afa36a
cdc5783
 
 
 
 
 
 
 
 
 
 
6afa36a
 
 
 
cdc5783
eed9cc2
a3a6ac3
 
eed9cc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from fastapi import FastAPI, Request
from pydantic import BaseModel

from summary import summarize

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: Request):
    print('=============')
    print(await request.json())
    return ''