zswwsz commited on
Commit
0d3b4b7
1 Parent(s): ba3c131

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -29,6 +29,7 @@ def preprocess(temp):
29
 
30
  def classify_text(inp):
31
  inp = preprocess(inp)
 
32
  print(inp)
33
  with torch.no_grad():
34
  logits = model(**inp).logits
 
29
 
30
  def classify_text(inp):
31
  inp = preprocess(inp)
32
+ inp = tokenizer(inp, padding=True, max_length=512, truncation=True, return_tensors="pt")
33
  print(inp)
34
  with torch.no_grad():
35
  logits = model(**inp).logits