beam size 1
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def predict_transnormer(tokenized_sentences, progress):
|
|
47 |
ds = KeyDataset(Dataset.from_dict(dict(types=list(raw_sentences))), "types")
|
48 |
|
49 |
output_sentences = []
|
50 |
-
for out_sentence in progress.tqdm(pipe(ds, num_beams=
|
51 |
output_sentences.append(out_sentence[0]['generated_text'])
|
52 |
|
53 |
return output_sentences
|
|
|
47 |
ds = KeyDataset(Dataset.from_dict(dict(types=list(raw_sentences))), "types")
|
48 |
|
49 |
output_sentences = []
|
50 |
+
for out_sentence in progress.tqdm(pipe(ds, num_beams=1, max_length=1024)):
|
51 |
output_sentences.append(out_sentence[0]['generated_text'])
|
52 |
|
53 |
return output_sentences
|