File size: 334 Bytes
cdc5783
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c034d4c
 
 
cdc5783
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from fastapi import FastAPI

from summary import summarize

app = FastAPI()


@app.get("/")
async def root():
    return {"message": "Hello World"}


@app.post("/summary/")
async def summary(text_request):
    text = text_request.text
    print(text_request.key)
    print(text)
    print('==============')
    return summarize(text)