fschwartzer commited on
Commit
10379c1
1 Parent(s): 0004b57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -7,6 +7,10 @@ from transformers import GPT2Tokenizer, GPT2LMHeadModel
7
  tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
8
  model = GPT2LMHeadModel.from_pretrained('gpt2')
9
 
 
 
 
 
10
  df = pd.read_csv('anomalies.csv')
11
 
12
  # Função para gerar resposta
 
7
  tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
8
  model = GPT2LMHeadModel.from_pretrained('gpt2')
9
 
10
+ # Set the padding token to the end-of-sequence token
11
+ if tokenizer.pad_token is None:
12
+ tokenizer.pad_token = tokenizer.eos_token
13
+
14
  df = pd.read_csv('anomalies.csv')
15
 
16
  # Função para gerar resposta