Instructions to use EngrSamad/BERT-Text-Classification-Model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use EngrSamad/BERT-Text-Classification-Model with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("EngrSamad/BERT-Text-Classification-Model", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
---
|
| 2 |
pipeline_tag: text-classification
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
# BERT Text Classification Model
|
| 5 |
|
|
@@ -12,4 +14,6 @@ To use the model, you can call the `classify_text` function with a text input, a
|
|
| 12 |
```python
|
| 13 |
text = "This is a positive review."
|
| 14 |
predicted_class = classify_text(text)
|
| 15 |
-
print("Predicted class:", predicted_class)
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
pipeline_tag: text-classification
|
| 3 |
+
metrics:
|
| 4 |
+
- accuracy
|
| 5 |
---
|
| 6 |
# BERT Text Classification Model
|
| 7 |
|
|
|
|
| 14 |
```python
|
| 15 |
text = "This is a positive review."
|
| 16 |
predicted_class = classify_text(text)
|
| 17 |
+
print("Predicted class:", predicted_class)
|
| 18 |
+
|
| 19 |
+
Devlin, J., Chang, M. W., Lee, K., & Toutanova, K. (2018). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv preprint arXiv:1810.04805.
|