zuozuo commited on
Commit
43dd320
·
1 Parent(s): 7cdfa4e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,9 +7,9 @@ Description:
7
  FilePath: /zuo/app.py
8
  '''
9
  import gradio as gr
10
- from transformers import BertTokenizer, GPT2LMHeadModel,TextGenerationPipeline
11
- tokenizer = BertTokenizer.from_pretrained("./")
12
- model = GPT2LMHeadModel.from_pretrained("./")
13
  text_generator = TextGenerationPipeline(model, tokenizer)
14
 
15
  def poem(cls):
 
7
  FilePath: /zuo/app.py
8
  '''
9
  import gradio as gr
10
+ from transformers import BertTokenizer, TFGPT2LMHeadModel,TextGenerationPipeline
11
+ tokenizer = BertTokenizer.from_pretrained("./tokenizer_config.json")
12
+ model = TFGPT2LMHeadModel.from_pretrained("./config.json")
13
  text_generator = TextGenerationPipeline(model, tokenizer)
14
 
15
  def poem(cls):