Downloads · 30 days
11
26% of all-time downloads
waghelad/dgvj-work
dgvj-work is a text classification model from waghelad. Use it when you need a label for a piece of text. It is set up for morphsql. The card lists the license as apache-2.0.
Small TF-IDF + LogisticRegression model that scores SQL migration risk (low / medium / high).
Downloads · 30 days
11
26% of all-time downloads
All-time downloads
43
Public
Repo size
70.1 KB
Likes
0
Public
Click a slice to open those files.
.joblib70.1 KB · 94%
From the Hugging Face model README
Small TF-IDF + LogisticRegression model that scores SQL migration risk (low / medium / high).
Used by MorphSQL (Space).
Python package import: morphsql (PyPI: morphsql).
| File | Purpose |
|---|---|
risk_classifier.joblib | sklearn pipeline |
rewrite_vocabulary.json | common SQL rewrite map |
config.json | dialects + metadata |
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"))
Author: Digvijay Waghela · Apache-2.0