Update inference.py
Browse files- inference.py +1 -1
inference.py
CHANGED
|
@@ -28,7 +28,7 @@ def inference(input_text):
|
|
| 28 |
tokenizer = torch.load(saved_model_path + 'fine-tuned-tokenizer.pt', map_location=torch.device('cpu'))
|
| 29 |
model.eval()
|
| 30 |
input = tokenizer(input_text)
|
| 31 |
-
input_ids = torch.Tensor(input['input_ids'])
|
| 32 |
mask = torch.Tensor(input['attention_mask'])
|
| 33 |
output = model(input_ids, mask)
|
| 34 |
|
|
|
|
| 28 |
tokenizer = torch.load(saved_model_path + 'fine-tuned-tokenizer.pt', map_location=torch.device('cpu'))
|
| 29 |
model.eval()
|
| 30 |
input = tokenizer(input_text)
|
| 31 |
+
input_ids = torch.Tensor(input['input_ids'])
|
| 32 |
mask = torch.Tensor(input['attention_mask'])
|
| 33 |
output = model(input_ids, mask)
|
| 34 |
|