Spaces:
Sleeping
Sleeping
update summarize endpoint to adjust summary length parameters
Browse files
main.py
CHANGED
|
@@ -16,5 +16,5 @@ async def root():
|
|
| 16 |
|
| 17 |
@app.post("/summarize") # Changed from GET to POST
|
| 18 |
async def summarize_text(input: TextInput):
|
| 19 |
-
summary = summarizer(input.text, max_length=
|
| 20 |
return {"summary": summary[0]["summary_text"]} # Return the actual summary
|
|
|
|
| 16 |
|
| 17 |
@app.post("/summarize") # Changed from GET to POST
|
| 18 |
async def summarize_text(input: TextInput):
|
| 19 |
+
summary = summarizer(input.text, max_length=21, min_length=5, do_sample=False)
|
| 20 |
return {"summary": summary[0]["summary_text"]} # Return the actual summary
|