ltomczak1 commited on
Commit
36adc6d
1 Parent(s): fefb348

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,8 +1,8 @@
1
  import gradio as gr
2
  from transformers import GPT2LMHeadModel, GPT2Tokenizer
3
 
4
- tokenizer = GPT2Tokenizer.from_pretrained('gpt2-large')
5
- model = GPT2LMHeadModel.from_pretrained('gpt2-large', pad_token_id = tokenizer.eos_token_id)
6
 
7
  def generator(text):
8
  input_ids = tokenizer.encode(text, return_tensors = 'pt')
 
1
  import gradio as gr
2
  from transformers import GPT2LMHeadModel, GPT2Tokenizer
3
 
4
+ tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
5
+ model = GPT2LMHeadModel.from_pretrained('gpt2', pad_token_id = tokenizer.eos_token_id)
6
 
7
  def generator(text):
8
  input_ids = tokenizer.encode(text, return_tensors = 'pt')