Yaron Koresh commited on
Commit
f0ca6e5
·
verified ·
1 Parent(s): 3df19d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -546,11 +546,11 @@ def upscaler(
546
  return enhanced_image
547
 
548
  def summarize_text(
549
- text, min_length=5, max_length=20
550
  ):
551
  log(f'CALL summarize_text')
552
- summ = pipeline("summarization", model="google/pegasus-large")
553
- summary = summ("Summarize accurately, highlighting key information: " + text, max_length=max_length, min_length=min_length)[0]["summary_text"]
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