varl42 commited on
Commit
139900a
·
1 Parent(s): 39a42b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -35,14 +35,14 @@ def summarize_text(text):
35
 
36
  # Tokenize abstract
37
  inputs = tokenizer(abstract,
38
- max_length=512,
39
  return_tensors="pt",
40
  truncation=True)
41
 
42
  # Generate summary
43
  summary_ids = model.generate(inputs['input_ids'],
44
- max_length=47,
45
- min_length=8,
46
  no_repeat_ngram_size=3,
47
  encoder_no_repeat_ngram_size=3,
48
  repetition_penalty=3.5,
 
35
 
36
  # Tokenize abstract
37
  inputs = tokenizer(abstract,
38
+ max_length=1024,
39
  return_tensors="pt",
40
  truncation=True)
41
 
42
  # Generate summary
43
  summary_ids = model.generate(inputs['input_ids'],
44
+ max_length=50,
45
+ min_length=30,
46
  no_repeat_ngram_size=3,
47
  encoder_no_repeat_ngram_size=3,
48
  repetition_penalty=3.5,