Spaces:
Runtime error
Runtime error
kimmeoungjun
commited on
Commit
•
abd383d
1
Parent(s):
3ad1374
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def my_split(s, seps):
|
|
22 |
def chat_base(input):
|
23 |
p = input
|
24 |
input_ids = tokenizer(p, return_tensors="pt").input_ids.to(device)
|
25 |
-
gen_tokens = model.generate(input_ids, do_sample=True, early_stopping=True,
|
26 |
gen_text = tokenizer.batch_decode(gen_tokens)[0]
|
27 |
# print(gen_text)
|
28 |
result = gen_text[len(p):]
|
|
|
22 |
def chat_base(input):
|
23 |
p = input
|
24 |
input_ids = tokenizer(p, return_tensors="pt").input_ids.to(device)
|
25 |
+
gen_tokens = model.generate(input_ids, do_sample=True, early_stopping=True, eos_token_id=2,)
|
26 |
gen_text = tokenizer.batch_decode(gen_tokens)[0]
|
27 |
# print(gen_text)
|
28 |
result = gen_text[len(p):]
|