Spaces:
Sleeping
Sleeping
adjust max_length parameter in summarize endpoint to improve summary conciseness
Browse files
main.py
CHANGED
|
@@ -16,5 +16,5 @@ async def root():
|
|
| 16 |
|
| 17 |
@app.post("/summarize")
|
| 18 |
async def summarize_text(input: TextInput):
|
| 19 |
-
summary = (summarizer(input.text, max_length=
|
| 20 |
return {"summary": summary[0]['summary_text']}
|
|
|
|
| 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 {"summary": summary[0]['summary_text']}
|