Spaces:
Sleeping
Sleeping
adarshj322
commited on
Commit
·
04846e4
1
Parent(s):
0ca1911
Chnages to length
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ def generateSubject(email):
|
|
57 |
prompts_batch_ids = tokenizer(prompts,
|
58 |
padding=True, truncation=True, return_tensors='pt').to(model.device)
|
59 |
output_ids = model.generate(
|
60 |
-
**prompts_batch_ids, max_new_tokens=
|
61 |
pad_token_id=tokenizer.pad_token_id)
|
62 |
outputs_batch = [seq.split('<subject>')[1] for seq in
|
63 |
tokenizer.batch_decode(output_ids, skip_special_tokens=True)]
|
|
|
57 |
prompts_batch_ids = tokenizer(prompts,
|
58 |
padding=True, truncation=True, return_tensors='pt').to(model.device)
|
59 |
output_ids = model.generate(
|
60 |
+
**prompts_batch_ids, max_new_tokens=10,
|
61 |
pad_token_id=tokenizer.pad_token_id)
|
62 |
outputs_batch = [seq.split('<subject>')[1] for seq in
|
63 |
tokenizer.batch_decode(output_ids, skip_special_tokens=True)]
|