Spaces:
Sleeping
Sleeping
update summarize endpoint to return summary as a JSON object
Browse files
main.py
CHANGED
|
@@ -17,4 +17,4 @@ async def root():
|
|
| 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 "
|
|
|
|
| 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 {"summary": summary[0]['summary_text']}
|