Error in code "Transformers pipeline"

#191
by SaraAmd - opened

when I run the sample code "Transformers pipeline" I get the error
"File ~/.local/lib/python3.8/site-packages/transformers/pipelines/pt_utils.py:19, in PipelineDataset.getitem(self, i)
17 def getitem(self, i):
18 item = self.dataset[i]
---> 19 processed = self.process(item, **self.params)
20 return processed

File ~/.local/lib/python3.8/site-packages/transformers/pipelines/text_generation.py:205, in TextGenerationPipeline.preprocess(self, prompt_text, prefix, handle_long_generation, **generate_kwargs)
203 def preprocess(self, prompt_text, prefix="", handle_long_generation=None, **generate_kwargs):
204 inputs = self.tokenizer(
--> 205 prefix + prompt_text, padding=False, add_special_tokens=False, return_tensors=self.framework
206 )
207 inputs["prompt_text"] = prompt_text
209 if handle_long_generation == "hole":

TypeError: can only concatenate str (not "dict") to str"

Sign up or log in to comment