Spaces:
Sleeping
Sleeping
File size: 484 Bytes
fa64206 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
from huggingface_hub import HfApi
import os
def deploy_model_to_huggingface(model_path, model_name):
api = HfApi()
api.upload_folder(
folder_path=model_path,
repo_id=model_name,
commit_message="Deploying fine-tuned model",
use_auth_token=os.getenv("HF_AUTH_TOKEN")
)
if __name__ == "__main__":
model_path = "./results_student"
model_name = "your_model_name"
deploy_model_to_huggingface(model_path, model_name)
|