Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -547,11 +547,11 @@ def upscaler(
|
|
547 |
return enhanced_image
|
548 |
|
549 |
def summarize_text(
|
550 |
-
text, min_length=
|
551 |
):
|
552 |
log(f'CALL summarize_text')
|
553 |
-
summ = pipeline("summarization", model="
|
554 |
-
summary = summ("summarize: " + text, max_length=max_length, min_length=min_length, do_sample=
|
555 |
log(f'RET summarize_text with summary as {summary}')
|
556 |
return summary
|
557 |
|
|
|
547 |
return enhanced_image
|
548 |
|
549 |
def summarize_text(
|
550 |
+
text, min_length=2, max_length=8
|
551 |
):
|
552 |
log(f'CALL summarize_text')
|
553 |
+
summ = pipeline("summarization", model="google/pegasus-large")
|
554 |
+
summary = summ("summarize: " + text, max_length=max_length, min_length=min_length, do_sample=True)[0]["summary_text"]
|
555 |
log(f'RET summarize_text with summary as {summary}')
|
556 |
return summary
|
557 |
|