Views
No views yet
| File | Description |
|---|---|
wittr_naive.pkl | Trained Naive Bayes classifier |
wittr_naive_vectorizer.pkl | TF–IDF vectorizer (must be used with the model) |
wittr_naive.py | Simple python script |
README.md | This documentation |
1from huggingface_hub import hf_hub_download
2import joblib
3
4repo = "Lucanix/wittr"
5
6clf = joblib.load(hf_hub_download(repo, "wittr_naive.pkl"))
7vectorizer = joblib.load(hf_hub_download(repo, "wittr_naive_vectorizer.pkl"))
8
9text = ["18 Bales G. S. & and Chrzan, D. C. Dynamics of irreversible island growth during submonolayer epitaxy. *Phys. Rev. B* **50**, 6057–6067 (1994)."]
10X = vectorizer.transform(text)
11print(clf.predict(X)) # → [1]