Text classification output

The output of the classification model is in scores.**

Instead of getting in scores, I want the output to display only the labels which are related to the text not in scores, is there any way to do that ??

doc.cats is a regular dictionary, so you could just convert the output to whatever you need? You just need to decide what scores you consider "related" – greater than 0.5, or greater than 0.75? There's no easy answer for that and it depends on your use case, model etc. that's up to you. Then you can do something like:

labels = [label for label, score in doc.cats.items() if score > 0.5)]

(Also, are you sure you want to train a text classifier to predict ORG and PERSON? This sounds more like a named entity recognition task?)