qa-text-classifier / README.md
aylajadu's picture
initial commit
c7b7a3e verified
|
Raw History Blame Contribute Delete
639 Bytes
metadata
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

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