How to use pipeline custom code/make new pipeline?
Hi, I read all the topics and post related to the questions that I am asking but I can’t seem to find anyone using the code that thisPipelinesand thisHow to add a pipeline to 🤗 Transformers?link used. I do not really understand how I am supposed to use the code but I need to customise the pipeline to fit my intent classification data. I’m not sure which code I’m supposed to be using so I tried both code from the link.For this code, what am I supposed to change TextClassificationPipeline to? Or am I supposed to import something?image964×762 46.9 KBFor this code, what am I supposed to put in Tensor(). The documentation said to put a desired input like dictionary so I tried putting a dictionary which allowed the class to run. I added this tokenized data into the Tensor()image1336×514 39.9 KBimage942×714 46.4 KBhowever, the output was not what I wanted.image571×529 12.6 KBso I tried calling the pipeline by adding another code as I have seen in the pipeline documentation. but I got an error saying Tensor is not defined. I tried importing Tensor but it says no module named Tensor even though I already pip install Tensorimage615×508 28 KBimage1356×523 48.2 KBIn the documentation, it showed that there was a new pipeline made and I was so confused how the person was able to make a new pipeline called my-new-task. I really need help regarding this and I’m sorry this post is quite all over the place because I’m not sure what I’m supposed to be trying to make my code work. The expected output I want would be something like the documentation using my-new-task pipeline and being able to predict the score of the label predicted. As I am doing intent classification and not text classification, the pipeline for textclassification does not suit me as I need the prediction to be my data’s label.image966×306 21.3 KBThis is an example of my dataset.My purpose for using pipeline is to get the score for the predicted output because I need a scoring system like confidence score to get the fallback intent.Really hope someone can help because this is for school project and the deadline is near ><