liuwei commited on
Commit
8054a93
1 Parent(s): 1abeaa7

gpt2 model path

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -14,7 +14,7 @@ def app():
14
 
15
  def generate_text(input_text):
16
  # 加载预训练模型
17
- generator = pipeline("text-generation", model="/Users/admin/mypy/hugging-models/gpt2")
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)