resilience commited on
Commit
11a8b4d
·
verified ·
1 Parent(s): 1253e68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -10,7 +10,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_dir)
10
  model = AutoModelForSequenceClassification.from_pretrained(model_dir, config=config)
11
 
12
  def inference(input_text):
13
- inputs = tokenizer.batch_encode_plus([input_text], return_tensors="pt", padding=True, max_length=512, truncation=True, padding="max_length")
14
 
15
  with torch.no_grad():
16
  logits = model(**inputs)["logits"]
 
10
  model = AutoModelForSequenceClassification.from_pretrained(model_dir, config=config)
11
 
12
  def inference(input_text):
13
+ inputs = tokenizer.batch_encode_plus([input_text], return_tensors="pt", max_length=512, truncation=True, padding="max_length")
14
 
15
  with torch.no_grad():
16
  logits = model(**inputs)["logits"]