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