Update app.py
Browse files
app.py
CHANGED
@@ -75,7 +75,7 @@ def trans(text):
|
|
75 |
|
76 |
# 生成
|
77 |
buf = ""
|
78 |
-
for token in llm.generate(initial_tokens, top_p=0.95, temp=0.0,
|
79 |
decoded = llm.detokenize([token]).decode('utf-8', errors='ignore')
|
80 |
buf += decoded
|
81 |
if token == llm.token_eos():
|
|
|
75 |
|
76 |
# 生成
|
77 |
buf = ""
|
78 |
+
for token in llm.generate(initial_tokens, top_p=0.95, temp=0.0, repeat_penalty=1.0):
|
79 |
decoded = llm.detokenize([token]).decode('utf-8', errors='ignore')
|
80 |
buf += decoded
|
81 |
if token == llm.token_eos():
|