Text Classification
Joblib
Scikit-learn
English
morphsql
morphsql-agent
code
sql
agent
text-generation
rag
migration
snowflake
dbt
Instructions to use waghelad/dgvj-work with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use waghelad/dgvj-work with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("waghelad/dgvj-work", "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
MorphSQL risk classifier
Small TF-IDF + LogisticRegression model that scores SQL migration risk (low / medium / high).
Used by MorphSQL (Space).
Python package import: morphsql (PyPI: morphsql).
Files
| File | Purpose |
|---|---|
risk_classifier.joblib |
sklearn pipeline |
rewrite_vocabulary.json |
common SQL rewrite map |
config.json |
dialects + metadata |
Usage
from huggingface_hub import hf_hub_download
import joblib
path = hf_hub_download(repo_id="dgvj-work/morphsql", filename="risk_classifier.joblib")
clf = joblib.load(path)
print(clf.predict(["EXECUTE IMMEDIATE 'SELECT 1'"]))
from morphsql.ai import pipeline
print(pipeline("sql-risk-classification")("CREATE PROCEDURE p AS BEGIN NULL; END;"))
print(pipeline("sql-migration")("SELECT ZEROIFNULL(a) FROM t"))
Links
- Space: https://huggingface.co/spaces/dgvj-work/morphsql
- Dataset: https://huggingface.co/datasets/dgvj-work/vertica-snowflake-pairs
- GitHub: https://github.com/dgvj-work/morphsql
Author: Digvijay Waghela · Apache-2.0
- Downloads last month
- 16