Update app/core/summarizer.py
Browse files- app/core/summarizer.py +1 -1
app/core/summarizer.py
CHANGED
|
@@ -36,7 +36,7 @@ def get_summary(text):
|
|
| 36 |
for i, chunk in enumerate(chunks):
|
| 37 |
logging.info(f"Summarizing chunk {i+1}/{len(chunks)} (length: {len(chunk)})")
|
| 38 |
try:
|
| 39 |
-
result = summarizer(chunk, max_length=
|
| 40 |
summaries.append(result[0]['summary_text'])
|
| 41 |
logging.info(f"Chunk {i+1} summary: {result[0]['summary_text']}")
|
| 42 |
except Exception as e:
|
|
|
|
| 36 |
for i, chunk in enumerate(chunks):
|
| 37 |
logging.info(f"Summarizing chunk {i+1}/{len(chunks)} (length: {len(chunk)})")
|
| 38 |
try:
|
| 39 |
+
result = summarizer(chunk, max_length=120, min_length=20, do_sample=False)
|
| 40 |
summaries.append(result[0]['summary_text'])
|
| 41 |
logging.info(f"Chunk {i+1} summary: {result[0]['summary_text']}")
|
| 42 |
except Exception as e:
|