Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 =
|
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 |
|