Spaces:
Runtime error
Runtime error
dennis-fast
commited on
Commit
•
86268a1
1
Parent(s):
61730d0
Update app.py
Browse files
app.py
CHANGED
@@ -16,14 +16,13 @@ def predict(input, history=[]):
|
|
16 |
|
17 |
# generate a response
|
18 |
history = model.generate(bot_input_ids,
|
19 |
-
max_length=
|
20 |
pad_token_id=tokenizer.eos_token_id,
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
#temperature=0.8
|
27 |
).tolist()
|
28 |
|
29 |
# convert the tokens to text, and then split the responses into the right format
|
|
|
16 |
|
17 |
# generate a response
|
18 |
history = model.generate(bot_input_ids,
|
19 |
+
max_length=200,
|
20 |
pad_token_id=tokenizer.eos_token_id,
|
21 |
+
no_repeat_ngram_size=3,
|
22 |
+
do_sample=True,
|
23 |
+
top_k=100,
|
24 |
+
top_p=0.7,
|
25 |
+
temperature = 0.8
|
|
|
26 |
).tolist()
|
27 |
|
28 |
# convert the tokens to text, and then split the responses into the right format
|