Instructions to use aylajadu/qa-text-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use aylajadu/qa-text-classifier with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("aylajadu/qa-text-classifier", "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
|
Download README.md from aylajadu/qa-text-classifier: direct link, hf CLI and curl.
- Browser
- Download file 639 Bytes
-
https://huggingface.co/aylajadu/qa-text-classifier/resolve/main/README.md
- Command line
-
hf download hf://aylajadu/qa-text-classifier/README.md
-
curl -L -o README.md https://huggingface.co/aylajadu/qa-text-classifier/resolve/main/README.md
639 Bytes
| license: apache-2.0 | |
| tags: | |
| - text-classification | |
| - scikit-learn | |
| - tfidf | |
| - logistic-regression | |
| library_name: sklearn | |
| # QA Text Classifier | |
| A small question-answering text classifier: TF-IDF features + Logistic Regression, | |
| trained on 10 question/answer pairs (AI, ML, deep learning, Python, CPU, GPU, NLP, | |
| data science, optimizer, gradient descent). | |
| Intended for demos and teaching of classic ML pipelines. | |
| ## Usage | |
| ```python | |
| import pickle | |
| with open("qa_model.pkl", "rb") as f: | |
| bundle = pickle.load(f) | |
| q = "What is AI?" | |
| print(bundle["classifier"].predict(bundle["vectorizer"].transform([q]))[0]) | |
| ``` | |
| ## License | |
| apache-2.0 | |