Instructions to use Egrove/keyword-intent-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use Egrove/keyword-intent-classifier with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("Egrove/keyword-intent-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 Egrove/keyword-intent-classifier: direct link, hf CLI and curl.
- Browser
- Download file 2.32 kB
-
https://huggingface.co/Egrove/keyword-intent-classifier/resolve/main/README.md
- Command line
-
hf download hf://Egrove/keyword-intent-classifier/README.md
-
curl -L -o README.md https://huggingface.co/Egrove/keyword-intent-classifier/resolve/main/README.md
2.32 kB
| license: apache-2.0 | |
| library_name: sklearn | |
| pipeline_tag: text-classification | |
| tags: | |
| - keyword-intent | |
| - search-intent | |
| - seo | |
| # Keyword Intent Classifier | |
| A search-intent classification model trained on **1,000,000 keyword records (10 lakh rows)** for SEO keyword analysis. | |
| The model classifies keywords into four categories: | |
| | Label | Meaning | Example | | |
| |---|---|---| | |
| | informational | Seeking information or answers | what is artificial intelligence | | |
| | navigational | Looking for a specific website or page | facebook login | | |
| | commercial | Researching or comparing before buying | best crm software | | |
| | transactional | Intending to purchase or take action | buy laptop online | | |
| ## Installation | |
| Use Python 3.12. Download `requirements.txt` from this repository and install the dependencies: | |
| ```bash | |
| python -m pip install -r requirements.txt | |
| ``` | |
| ## Usage | |
| Download the model and its required supporting module, then predict keyword intent: | |
| ```python | |
| import sys | |
| from pathlib import Path | |
| import joblib | |
| from huggingface_hub import snapshot_download | |
| folder = snapshot_download( | |
| repo_id="Egrove/keyword-intent-classifier", | |
| allow_patterns=[ | |
| "keyword_intent_model.pkl", | |
| "intent_preprocess.py", | |
| ], | |
| ) | |
| sys.path.insert(0, folder) | |
| model = joblib.load( | |
| Path(folder) / "keyword_intent_model.pkl" | |
| ) | |
| keywords = [ | |
| "facebook login", | |
| "buy laptop online", | |
| "what is artificial intelligence", | |
| "best crm software", | |
| ] | |
| predictions = model.predict(keywords) | |
| for keyword, intent in zip(keywords, predictions): | |
| print(f"{keyword} -> {intent}") | |
| ``` | |
| ### Example output | |
| ```text | |
| facebook login -> navigational | |
| buy laptop online -> transactional | |
| what is artificial intelligence -> informational | |
| best crm software -> commercial | |
| ``` | |
| Keep `intent_preprocess.py` available when loading the model. | |
| ## Limitations | |
| Keywords can have multiple or ambiguous meanings. Evaluate predictions on your own keywords before production use. No benchmark accuracy or F1 score is claimed. | |
| ## Security | |
| Only load this model and its supporting Python module if you trust their source. Loading pickle/joblib files and importing Python modules can execute code. | |
| ## License | |
| This model is released under the **Apache License, Version 2.0**. See [LICENSE.txt](LICENSE.txt) for the full terms. | |