Spaces:
Runtime error
Runtime error
YanshekWoo
commited on
Commit
•
e47f086
1
Parent(s):
02f0e9a
update generate parameters
Browse files
app.py
CHANGED
@@ -29,7 +29,10 @@ def chat_func(input_utterance: str, history: Optional[List[str]] = None):
|
|
29 |
input_ids = tokenizer(history_str,
|
30 |
return_tensors='pt',
|
31 |
truncation=True,
|
32 |
-
max_length=max_length
|
|
|
|
|
|
|
33 |
|
34 |
output_ids = model.generate(input_ids,
|
35 |
max_new_tokens=30)[0]
|
|
|
29 |
input_ids = tokenizer(history_str,
|
30 |
return_tensors='pt',
|
31 |
truncation=True,
|
32 |
+
max_length=max_length,
|
33 |
+
top_p=0.95,
|
34 |
+
do_sample=True,
|
35 |
+
num_beams=4).input_ids
|
36 |
|
37 |
output_ids = model.generate(input_ids,
|
38 |
max_new_tokens=30)[0]
|