dengkane commited on
Commit
211bdd3
·
1 Parent(s): 6b4b83c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,8 +7,8 @@ set_seed(42)
7
  # 引入后台代码
8
  def backend(question):
9
  # 在这里编写后台处理代码,此处为示例
10
- res = generator("===question===\n" + question + ". \n===answer===\n ", max_length=30, num_return_sequences=5)
11
- return res
12
 
13
  # 构建页面布局
14
  st.title("GPT-2 Demo")
 
7
  # 引入后台代码
8
  def backend(question):
9
  # 在这里编写后台处理代码,此处为示例
10
+ res = generator("===question===\n" + question + ". \n===answer===\n ", max_length=1000, num_return_sequences=1)
11
+ return res[0]
12
 
13
  # 构建页面布局
14
  st.title("GPT-2 Demo")