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
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
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
- Downloads last month
- -