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
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: text-classification
|
| 3 |
+
---
|
| 4 |
+
# BERT Text Classification Model
|
| 5 |
+
|
| 6 |
+
This is a simple demo model for text classification using BERT.
|
| 7 |
+
|
| 8 |
+
## Usage
|
| 9 |
+
|
| 10 |
+
To use the model, you can call the `classify_text` function with a text input, and it will return the predicted class label.
|
| 11 |
+
|
| 12 |
+
```python
|
| 13 |
+
text = "This is a positive review."
|
| 14 |
+
predicted_class = classify_text(text)
|
| 15 |
+
print("Predicted class:", predicted_class)
|