Update README.md
Browse files
README.md
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## How to use?
|
| 2 |
+
### Specifically finetuned for bank queries , to understand weather user want to to trasaction or not.
|
| 3 |
+
|
| 4 |
+
hf_model = "pankaj1881/question-classification"
|
| 5 |
+
|
| 6 |
+
#### question classification pipeline
|
| 7 |
+
classifier = pipeline("text-classification", model=hf_model )
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
#### prediction
|
| 11 |
+
query = " your question or statement"
|
| 12 |
+
|
| 13 |
+
result = classifier(query) # return "True" if query === question , else "False" # return "True" if query === question , else "False"
|
| 14 |
+
|
| 15 |
+
print(result)
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
## output
|
| 19 |
+
### [{'label': 'True', 'score': 0.8767889142036438}]
|