# How can I use pipeline for sequence to sequence classification

**URL:** <https://discuss.huggingface.co/t/how-can-i-use-pipeline-for-sequence-to-sequence-classification/17753>\
**Category:** Beginners\
**Created:** [May 10, 2022, 7:19am UTC](https://discuss.huggingface.co/t/how-can-i-use-pipeline-for-sequence-to-sequence-classification/17753 "2022-05-10T07:19:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aomar85](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/aomar85/32/12631_2.png) [@aomar85](https://discuss.huggingface.co/u/aomar85)\
**Post date:** [May 10, 2022, 7:19am UTC](https://discuss.huggingface.co/t/how-can-i-use-pipeline-for-sequence-to-sequence-classification/17753/1 "2022-05-10T07:19:17Z")

</div>

Dear All,

I uploaded my own pre-trained model to the Huggingface repo, the model is trained on the task sequence to sequence binary “text-classification”. I want to make sure I am doing the code correctly, or there is another way to pass the two sequences to the classifier?

My code

```auto
from transformers import AutoModelForSequenceClassification

checkpoint = "aomar85/seq2seqBinaryClassifier"

model = AutoModelForSequenceClassification.from_pretrained(checkpoint)

from transformers import pipeline

from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(checkpoint)

classifier = pipeline("text-classification", model=model,tokenizer=tokenizer)

seq1='الميزنيقيات (الاسم العلمي:†Mesonychia) هي منقرض رتبة من الثدييات تتبع فوق رتبة الوحشيات الظلفية من طائفة الثدييات.'

seq2='ميزنيقيات: رتبة من الثدييات'

classifier(seq1 +'[SEP]'+seq2 )

```
