Spaces:
Build error
Build error
Halo Master
commited on
Commit
·
7721fc2
1
Parent(s):
57bdbdf
sample=False
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ def preprocess(text):
|
|
20 |
def postprocess(text):
|
21 |
return text.replace("_", "\n")
|
22 |
|
23 |
-
def answer(text, sample=
|
24 |
'''sample:是否抽样。生成任务,可以设置为True;
|
25 |
top_p:0-1之间,生成的内容越多样'''
|
26 |
text = preprocess(text)
|
|
|
20 |
def postprocess(text):
|
21 |
return text.replace("_", "\n")
|
22 |
|
23 |
+
def answer(text, sample=False, top_p=0.6):
|
24 |
'''sample:是否抽样。生成任务,可以设置为True;
|
25 |
top_p:0-1之间,生成的内容越多样'''
|
26 |
text = preprocess(text)
|