Spaces:
Runtime error
Runtime error
liuwei
commited on
Commit
•
8054a93
1
Parent(s):
1abeaa7
gpt2 model path
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ def app():
|
|
14 |
|
15 |
def generate_text(input_text):
|
16 |
# 加载预训练模型
|
17 |
-
generator = pipeline("text-generation", model="
|
18 |
|
19 |
# 生成文本
|
20 |
output = generator(input_text, max_length=int(maxlen), num_return_sequences=1)
|
|
|
14 |
|
15 |
def generate_text(input_text):
|
16 |
# 加载预训练模型
|
17 |
+
generator = pipeline("text-generation", model="gpt2")
|
18 |
|
19 |
# 生成文本
|
20 |
output = generator(input_text, max_length=int(maxlen), num_return_sequences=1)
|