https://github.com/bigmb/mb_nlp
Nlp - text classifier
https://github.com/bigmb/mb_nlp
Last synced: 5 months ago
JSON representation
Nlp - text classifier
- Host: GitHub
- URL: https://github.com/bigmb/mb_nlp
- Owner: bigmb
- Created: 2025-04-17T10:29:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-17T12:57:11.000Z (over 1 year ago)
- Last Synced: 2025-04-18T03:15:08.055Z (over 1 year ago)
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mb_nlp
A simple package for text classification using the latest BERT models via Hugging Face Transformers.
## Installation
```bash
pip install mb_nlp
```
## Usage
```python
from mb_nlp import BertTextClassifier
classifier = BertTextClassifier(model_name='bert-base-uncased', num_labels=2)
prediction = classifier.predict("Your text here")
```
See `examples/example_usage.py` for more examples.
## Testing
Run the tests:
```bash
python tests/test_inputs.py
```