How to get all possibility of the prediction
#1
by
AdaptiveStoryfinder
- opened
Hi,
I would like to see all possibility of the prediction just like in the host inference. In transformers pipeline it could just return the first highest possibiilty of classification. Is there any ways that I could get all possibiilty except using inference API cause it has rate limit?
Thank you for your help.
Hey @AdaptiveStoryfinder Check out topK: https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.QuestionAnsweringPipeline.__call__.topk
Your payload would look something like:{"inputs": text_to_classify, "parameters": {"top_k": n}}
Where n
is the number of labels