Update app.py
Browse files
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=
|
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")
|