So you want to do inference with an already fine-tuned model?
Looking on the hub 2, there are currently no LongFormer checkpoints fine-tuned on a sentiment analysis dataset. So feel free to upload the first LongFormer checkpoint fine-tuned on a sentiment analysis dataset to the hub 
Once you’ve trained a model, you can plug it into the pipeline API for quick inference.
Here’s an example with a RoBERTa model from the hub, fine-tuned on sentiment analysis:
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline

model_name = "cardiffnlp/twitter-roberta-base-sentiment"
model = AutoModelForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

nlp = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)

text = "this is a very positive text"

outputs = nlp(text)

In this case, printing the outputs returns [{'label': 'LABEL_2', 'score': 0.9623518586158752}]. This is of course not that helpful, as we don’t know what LABEL_2 means. This is because the authors of this model have not updated the config.id2label. However, looking at this file (mentioned in the code example on the model page), it appears that LABEL_2 means “positive”.