KevlarVK commited on
Commit
cd309a8
1 Parent(s): 8817032

Update title_generator.py

Browse files
Files changed (1) hide show
  1. title_generator.py +1 -1
title_generator.py CHANGED
@@ -9,6 +9,6 @@ class T5Summarizer:
9
  inputs = ["summarize: " + text]
10
  max_input_length = self.tokenizer.model_max_length
11
  inputs = self.tokenizer(inputs, max_length=max_input_length, truncation=True, return_tensors="tf")
12
- output = self.model.generate(**inputs, num_beams=12, do_sample=True, min_length=2, max_length=8)
13
  summary = self.tokenizer.batch_decode(output, skip_special_tokens=True)[0]
14
  return summary
 
9
  inputs = ["summarize: " + text]
10
  max_input_length = self.tokenizer.model_max_length
11
  inputs = self.tokenizer(inputs, max_length=max_input_length, truncation=True, return_tensors="tf")
12
+ output = self.model.generate(**inputs, num_beams=12, do_sample=True, min_length=2, max_length=12)
13
  summary = self.tokenizer.batch_decode(output, skip_special_tokens=True)[0]
14
  return summary