Wootang01 commited on
Commit
478e5c0
1 Parent(s): c42314f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -15,7 +15,7 @@ model = T5ForConditionalGeneration.from_pretrained('deep-learning-analytics/Gram
15
 
16
  def correct_grammar(input_text, num_return_sequences=num_correct_options):
17
  batch = tokenizer([input_text], truncation=True, padding = 'max_length', max_length = 64, return_tensors = 'pt').to(torch_device)
18
- results = model.generate(**batch, max_length = 64, num_beams = 4, num_return_sequences = num_correct_options, temperature = 1.5)
19
 
20
  return results
21
 
 
15
 
16
  def correct_grammar(input_text, num_return_sequences=num_correct_options):
17
  batch = tokenizer([input_text], truncation=True, padding = 'max_length', max_length = 64, return_tensors = 'pt').to(torch_device)
18
+ results = model.generate(**batch, max_length = 64, num_beams = 5, num_return_sequences = num_correct_options, temperature = 1.5)
19
 
20
  return results
21