Spaces:
Sleeping
Sleeping
change summarize endpoint from GET to POST and update response message
Browse files
main.py
CHANGED
|
@@ -14,7 +14,7 @@ class TextInput(BaseModel):
|
|
| 14 |
async def root():
|
| 15 |
return {"message": "Welcome to the Text Summarization API!"}
|
| 16 |
|
| 17 |
-
@app.
|
| 18 |
async def summarize_text(input: TextInput):
|
| 19 |
summary = (summarizer(input.text, max_length=130, min_length=30, do_sample=False))
|
| 20 |
return "hello welcome to the summary end point"
|
|
|
|
| 14 |
async def root():
|
| 15 |
return {"message": "Welcome to the Text Summarization API!"}
|
| 16 |
|
| 17 |
+
@app.post("/summarize")
|
| 18 |
async def summarize_text(input: TextInput):
|
| 19 |
summary = (summarizer(input.text, max_length=130, min_length=30, do_sample=False))
|
| 20 |
return "hello welcome to the summary end point"
|