yaron123 commited on
Commit
c8d9a29
·
1 Parent(s): d0ad7e9
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -551,14 +551,12 @@ def upscaler(
551
  return enhanced_image
552
 
553
  def summarize_text(
554
- text, max_length=10
555
  ):
556
  log(f'CALL summarize_text')
557
  summary = pegasus_tokenizer.decode( pegasus_model.generate(
558
  pegasus_tokenizer(text,return_tensors="pt").input_ids,
559
- max_length=max_length,
560
- num_beams = 4,
561
- early_stopping=True
562
  )[0], skip_special_tokens=True)
563
  log(f'RET summarize_text with summary as {summary}')
564
  return summary
 
551
  return enhanced_image
552
 
553
  def summarize_text(
554
+ text, max_length=16
555
  ):
556
  log(f'CALL summarize_text')
557
  summary = pegasus_tokenizer.decode( pegasus_model.generate(
558
  pegasus_tokenizer(text,return_tensors="pt").input_ids,
559
+ max_length=max_length
 
 
560
  )[0], skip_special_tokens=True)
561
  log(f'RET summarize_text with summary as {summary}')
562
  return summary