Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def genQuestion(model_choice, context):
|
|
38 |
output = model.generate(inputs["input_ids"], num_beams=16, max_length=64, min_length=9, num_return_sequences=16, diversity_penalty = 1.0, num_beam_groups=4)
|
39 |
final_output = ''
|
40 |
print(output)
|
41 |
-
for i in range(
|
42 |
final_output += [tok.decode(beam, skip_special_tokens=True, clean_up_tokenization_spaces=False) for beam in output][i] + "\n\n"
|
43 |
|
44 |
return final_output
|
|
|
38 |
output = model.generate(inputs["input_ids"], num_beams=16, max_length=64, min_length=9, num_return_sequences=16, diversity_penalty = 1.0, num_beam_groups=4)
|
39 |
final_output = ''
|
40 |
print(output)
|
41 |
+
for i in range(16):
|
42 |
final_output += [tok.decode(beam, skip_special_tokens=True, clean_up_tokenization_spaces=False) for beam in output][i] + "\n\n"
|
43 |
|
44 |
return final_output
|