Spaces:
Runtime error
Runtime error
dennis-fast
commited on
Commit
·
54d6302
1
Parent(s):
fb55ceb
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ def predict(input, history=[]):
|
|
25 |
no_repeat_ngram_size=3,
|
26 |
#do_sample=True,
|
27 |
#temperature = 0.8
|
28 |
-
top_p=0.92,
|
29 |
top_k = 50
|
30 |
).tolist()
|
31 |
|
@@ -34,7 +34,7 @@ def predict(input, history=[]):
|
|
34 |
|
35 |
response = [(response[i], response[i+1]) for i in range(0, len(response)-1, 2)] # convert to tuples of list
|
36 |
|
37 |
-
if len(response) >
|
38 |
response.pop(0)
|
39 |
|
40 |
return response, history
|
|
|
25 |
no_repeat_ngram_size=3,
|
26 |
#do_sample=True,
|
27 |
#temperature = 0.8
|
28 |
+
top_p = 0.92,
|
29 |
top_k = 50
|
30 |
).tolist()
|
31 |
|
|
|
34 |
|
35 |
response = [(response[i], response[i+1]) for i in range(0, len(response)-1, 2)] # convert to tuples of list
|
36 |
|
37 |
+
if len(response) > 4:
|
38 |
response.pop(0)
|
39 |
|
40 |
return response, history
|