binxu commited on
Commit
e5a4373
1 Parent(s): 4dc002b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -17,7 +17,8 @@ from transformers import BertTokenizerFast, BertTokenizer
17
  # model.load_state_dict(torch.load(path2pytorch_model))
18
  # model.from_pretrained("binxu/Ziyue-GPT2")
19
  #%%
20
- model = GPT2LMHeadModel.from_pretrained("binxu/Ziyue-GPT2")
 
21
  generator = pipeline('text-generation', model=model, tokenizer='bert-base-chinese')
22
 
23
  def generate(prompt, num_beams, max_length, repetition_penalty, ):
 
17
  # model.load_state_dict(torch.load(path2pytorch_model))
18
  # model.from_pretrained("binxu/Ziyue-GPT2")
19
  #%%
20
+ # model = GPT2LMHeadModel.from_pretrained("binxu/Ziyue-GPT2")
21
+ model = GPT2LMHeadModel.from_pretrained("binxu/Ziyue-GPT2-deep")
22
  generator = pipeline('text-generation', model=model, tokenizer='bert-base-chinese')
23
 
24
  def generate(prompt, num_beams, max_length, repetition_penalty, ):