Spaces:
Build error
Build error
Commit
·
a47d713
1
Parent(s):
a92c20c
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ def genQuestion(model_choice, context, tag):
|
|
53 |
tok = BartTokenizer.from_pretrained("hyechanjun/reverse-interview-question")
|
54 |
|
55 |
inputs = tok(context, return_tensors="pt")
|
56 |
-
output = model.generate(inputs["input_ids"], num_beams=4, max_length=
|
57 |
final_output = ''
|
58 |
for i in range(4):
|
59 |
final_output += [tok.decode(beam, skip_special_tokens=True, clean_up_tokenization_spaces=False) for beam in output][i] + "\n\n"
|
|
|
53 |
tok = BartTokenizer.from_pretrained("hyechanjun/reverse-interview-question")
|
54 |
|
55 |
inputs = tok(context, return_tensors="pt")
|
56 |
+
output = model.generate(inputs["input_ids"], num_beams=4, max_length=1024, min_length=9, num_return_sequences=4, diversity_penalty=1.0, num_beam_groups=4)
|
57 |
final_output = ''
|
58 |
for i in range(4):
|
59 |
final_output += [tok.decode(beam, skip_special_tokens=True, clean_up_tokenization_spaces=False) for beam in output][i] + "\n\n"
|