Spaces:
Runtime error
Runtime error
quyip
commited on
Commit
·
d57b505
1
Parent(s):
67c90db
fix
Browse files
main.py
CHANGED
@@ -1,10 +1,6 @@
|
|
1 |
-
from
|
2 |
-
|
3 |
-
from fastapi import FastAPI, Request
|
4 |
from pydantic import BaseModel
|
5 |
|
6 |
-
from summary import summarize
|
7 |
-
|
8 |
app = FastAPI()
|
9 |
|
10 |
|
@@ -17,8 +13,9 @@ class SummaryReq(BaseModel):
|
|
17 |
text: str
|
18 |
key: str
|
19 |
|
|
|
20 |
@app.post("/summary/")
|
21 |
-
async def summary(request:
|
22 |
print('=============')
|
23 |
print(request)
|
24 |
return ''
|
|
|
1 |
+
from fastapi import FastAPI
|
|
|
|
|
2 |
from pydantic import BaseModel
|
3 |
|
|
|
|
|
4 |
app = FastAPI()
|
5 |
|
6 |
|
|
|
13 |
text: str
|
14 |
key: str
|
15 |
|
16 |
+
|
17 |
@app.post("/summary/")
|
18 |
+
async def summary(request: SummaryReq):
|
19 |
print('=============')
|
20 |
print(request)
|
21 |
return ''
|