Spaces:
Sleeping
Sleeping
Download src/send_model.py from arturevs/90AnimalClassification: direct link, hf CLI and curl.
- Browser
- Download file 530 Bytes
-
https://huggingface.co/spaces/arturevs/90AnimalClassification/resolve/main/src/send_model.py
- Command line
-
hf download hf://spaces/arturevs/90AnimalClassification/src/send_model.py
-
curl -L -o send_model.py https://huggingface.co/spaces/arturevs/90AnimalClassification/resolve/main/src/send_model.py
530 Bytes
| from huggingface_hub import HfApi | |
| # Nome do repositório no Hugging Face | |
| repo_id = "arturevs/90AnimalClassifier" # Substitua pelo seu usuário e nome do repositório | |
| # Arquivos a serem enviados | |
| files_to_upload = ["./mlp_classifier.joblib", "./label_encoder.joblib"] | |
| # Enviar arquivos para o Hugging Face | |
| api = HfApi() | |
| for file in files_to_upload: | |
| api.upload_file( | |
| path_or_fileobj=file, | |
| path_in_repo=file, | |
| repo_id=repo_id, | |
| repo_type="model" | |
| ) | |
| print("Modelo enviado para o Hugging Face!") |