Spaces:
Sleeping
Sleeping
File size: 423 Bytes
0874d87 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from huggingface_hub import HfApi, HfFolder, Repository
api = HfApi()
repo_url = api.create_repo(repo_id="saeedbenadeeb/emotion-detection", exist_ok=True)
repo = Repository(local_dir="emotion-detection", clone_from=repo_url)
repo.git_pull()
# Copy model files to the repo directory
import shutil
shutil.copy("model.pth", "emotion-detection")
# Add files and push
repo.push_to_hub(commit_message="Initial model upload")
|