Commit
·
ced43ed
1
Parent(s):
d1d326c
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
```python
|
| 3 |
+
from transformers import pipeline
|
| 4 |
+
|
| 5 |
+
pipe = pipeline(model="hamzaMM/questionClassifier", task="text-classification")
|
| 6 |
+
def is_question(input: str):
|
| 7 |
+
return pipe(input)[0]['label'] == 'LABEL_1'
|
| 8 |
+
|
| 9 |
+
is_question("How is the weather")
|
| 10 |
+
```
|