Views
No views yet
"True": if the query is a question"False": otherwisetransformers pipeline:1from transformers import pipeline
2
3hf_model = "pankaj1881/question-classification"
4
5classifier = pipeline("text-classification", model=hf_model)
6
7query = "I want to transfer 500 dollars to my friend"
8result = classifier(query)
9
10print(result)
11# Output example: [{'label': 'False', 'score': 0.8767889142036438}] i.e it's not a question.