Instructions to use Cerrine/CC with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use Cerrine/CC with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("Cerrine/CC", "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
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -56,7 +56,6 @@ from huggingface_hub import hf_hub_download
|
|
| 56 |
|
| 57 |
REPO_ID = "Cerrine/CC"
|
| 58 |
|
| 59 |
-
# Memuat model dan nama fitur
|
| 60 |
model = joblib.load(
|
| 61 |
hf_hub_download(REPO_ID, "model_saya.joblib")
|
| 62 |
)
|
|
@@ -65,13 +64,9 @@ fitur = joblib.load(
|
|
| 65 |
hf_hub_download(REPO_ID, "feature_names.joblib")
|
| 66 |
)
|
| 67 |
|
| 68 |
-
# Memuat data baru yang sudah melalui preprocessing
|
| 69 |
data_baru = pd.read_csv("data_baru_preprocessed.csv")
|
| 70 |
-
|
| 71 |
-
# Menyesuaikan kolom dan urutan fitur dengan data training
|
| 72 |
data_baru = data_baru.reindex(columns=fitur, fill_value=0)
|
| 73 |
|
| 74 |
-
# Melakukan prediksi
|
| 75 |
prediksi = model.predict(data_baru)
|
| 76 |
probabilitas = model.predict_proba(data_baru)[:, 1]
|
| 77 |
|
|
|
|
| 56 |
|
| 57 |
REPO_ID = "Cerrine/CC"
|
| 58 |
|
|
|
|
| 59 |
model = joblib.load(
|
| 60 |
hf_hub_download(REPO_ID, "model_saya.joblib")
|
| 61 |
)
|
|
|
|
| 64 |
hf_hub_download(REPO_ID, "feature_names.joblib")
|
| 65 |
)
|
| 66 |
|
|
|
|
| 67 |
data_baru = pd.read_csv("data_baru_preprocessed.csv")
|
|
|
|
|
|
|
| 68 |
data_baru = data_baru.reindex(columns=fitur, fill_value=0)
|
| 69 |
|
|
|
|
| 70 |
prediksi = model.predict(data_baru)
|
| 71 |
probabilitas = model.predict_proba(data_baru)[:, 1]
|
| 72 |
|