mkoot007 commited on
Commit
33bf4a5
·
1 Parent(s): 5768697

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ def explain_text(text):
18
  tokenizer = AutoTokenizer.from_pretrained("gpt2")
19
 
20
  # Encode the text and convert to PyTorch tensors
21
- inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=512)
22
 
23
  input_ids = inputs["input_ids"]
24
  attention_mask = inputs["attention_mask"]
 
18
  tokenizer = AutoTokenizer.from_pretrained("gpt2")
19
 
20
  # Encode the text and convert to PyTorch tensors
21
+ inputs = tokenizer([text], return_tensors="pt", padding=True, truncation=True, max_length=512)
22
 
23
  input_ids = inputs["input_ids"]
24
  attention_mask = inputs["attention_mask"]