hey @farazk86, you almost had it right with the pipeline - as described in the docs, you also need to provide the task with the model. in this case we’re dealing with text classification (entailment), so we can use the sentiment-analysis task as follows:
from transformers import pipeline
pipe = pipeline(task="sentiment-analysis", model="roberta-large-mnli")
pipe("I like you. </s></s> I love you.") # returns [{'label': 'NEUTRAL', 'score': 0.5168218612670898}]
Thanks for the reply @lewtun this allowed me to use pipeline with this model but it is not generating the predictions or labels as is shown on the demo or hosted page. There, on the same input of I like you. </s></s> I love you. It produces the following outputs:
CONTRADICTION
NEUTRAL
ENTAILMENT
with:
pipe = pipeline(task="sentiment-analysis", model="roberta-large-mnli")
pipe("I like you. </s></s> I love you.")
I am only getting the NEUTRAL output.
How do I get the same outputs as on the hosted API?