Spaces:
Running
Running
Update utils.py
Browse files
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(
|
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
|