Download code/kaggle_upload.py from Andrefty/ssl-pii-data-detection-deberta: direct link, hf CLI and curl.
- Browser
- Download file 914 Bytes
-
https://huggingface.co/Andrefty/ssl-pii-data-detection-deberta/resolve/main/code/kaggle_upload.py
- Command line
-
hf download hf://Andrefty/ssl-pii-data-detection-deberta/code/kaggle_upload.py
-
curl -L -o kaggle_upload.py https://huggingface.co/Andrefty/ssl-pii-data-detection-deberta/resolve/main/code/kaggle_upload.py
914 Bytes
| import kagglehub | |
| kagglehub.login() | |
| # Replace with path to directory containing model files. | |
| LOCAL_MODEL_DIR = '/export/home/acs/stud/t/tudor.farcasanu/SSL_Assignment/single_model/model/deberta_v3_large_w10_ado1_wd0_bs2_lr1e5_5epo_simplified_labels_fold0_best_hf' | |
| MODEL_SLUG = 'Single_model_only_comp_data' # Replace with model slug. | |
| # Learn more about naming model variations at | |
| # https://www.kaggle.com/docs/models#name-model. | |
| VARIATION_SLUG = 'training_length_4096_8labels_moredata' # Replace with variation slug. | |
| kagglehub.model_upload( | |
| handle = f"andreifrcanu/{MODEL_SLUG}/transformers/{VARIATION_SLUG}", | |
| local_model_dir = LOCAL_MODEL_DIR, | |
| version_notes = 'training_length_4096_8labels_moredata') | |
| # kagglehub.model_upload( | |
| # handle = f"andreifrcanu/{MODEL_SLUG}/pyTorch/{VARIATION_SLUG}", | |
| # local_model_dir = LOCAL_MODEL_DIR, | |
| # version_notes = 'training_length_4096_origlabels_actualmoredata') |