Spaces:
Sleeping
Sleeping
monsoon-nlp
commited on
Commit
•
6e9d2dd
1
Parent(s):
3e79d11
push sentence length
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ def hello(prompt, items):
|
|
43 |
force_inp += ' ' + remainder[0]
|
44 |
alt = inp + ' ' + force_inp
|
45 |
input_ids2 = torch.tensor([tokenizer.encode(alt)])
|
46 |
-
output2 = model.generate(input_ids2, max_new_tokens=
|
47 |
resp2 = tokenizer.decode(output2[0], skip_special_tokens=True)
|
48 |
resp2 = resp2[resp2.index('%') + 1 : ]
|
49 |
return [resp1, resp2]
|
43 |
force_inp += ' ' + remainder[0]
|
44 |
alt = inp + ' ' + force_inp
|
45 |
input_ids2 = torch.tensor([tokenizer.encode(alt)])
|
46 |
+
output2 = model.generate(input_ids2, max_new_tokens=30, min_length=30, do_sample=True)
|
47 |
resp2 = tokenizer.decode(output2[0], skip_special_tokens=True)
|
48 |
resp2 = resp2[resp2.index('%') + 1 : ]
|
49 |
return [resp1, resp2]
|