supermy commited on
Commit
9df366d
1 Parent(s): 17b3b4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import torch
2
 
3
  import gradio as gr
@@ -5,7 +6,7 @@ import torch.nn.functional as F
5
 
6
  from transformers import BertTokenizer, GPT2LMHeadModel,PreTrainedTokenizerFast
7
  # tokenizer = BertTokenizer.from_pretrained("supermy/poetry")
8
- tokenizer = PreTrainedTokenizerFast(vocab_file="poetry-bpe.json")
9
  model = GPT2LMHeadModel.from_pretrained("supermy/poetry")
10
  model.eval()
11
 
 
1
+
2
  import torch
3
 
4
  import gradio as gr
 
6
 
7
  from transformers import BertTokenizer, GPT2LMHeadModel,PreTrainedTokenizerFast
8
  # tokenizer = BertTokenizer.from_pretrained("supermy/poetry")
9
+ tokenizer = PreTrainedTokenizerFast(tokenizer_file="poetry-bpe.json")
10
  model = GPT2LMHeadModel.from_pretrained("supermy/poetry")
11
  model.eval()
12