rusen commited on
Commit
e01d8e6
·
1 Parent(s): 303d729

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +1 -1
utils.py CHANGED
@@ -10,7 +10,7 @@ def model_predict(model, tokenizer, sentences):
10
  """
11
 
12
 
13
- inputs = tokenizer(sentences, padding=True, truncation=True, return_tensors="pt", max_length=512).to(device)
14
  # Classify sentences
15
  with torch.no_grad():
16
  outputs = model(**inputs) # get the logits
 
10
  """
11
 
12
 
13
+ inputs = tokenizer(sentences, padding=True, truncation=True, return_tensors="pt", max_length=512).to("cpu")
14
  # Classify sentences
15
  with torch.no_grad():
16
  outputs = model(**inputs) # get the logits