maybe fix pipeline
Browse files- pipeline.py +2 -2
pipeline.py
CHANGED
@@ -20,8 +20,8 @@ class PreTrainedPipeline():
|
|
20 |
A :obj:`list` | `dict`: will be serialized and returned
|
21 |
"""
|
22 |
# compute the embedding of the input
|
23 |
-
query = data["inputs"]
|
24 |
-
inputs = self.tokenizer(
|
25 |
self.device
|
26 |
)
|
27 |
with torch.no_grad():
|
|
|
20 |
A :obj:`list` | `dict`: will be serialized and returned
|
21 |
"""
|
22 |
# compute the embedding of the input
|
23 |
+
# query = data["inputs"]
|
24 |
+
inputs = self.tokenizer(data, padding=True, return_tensors="pt").to(
|
25 |
self.device
|
26 |
)
|
27 |
with torch.no_grad():
|