Spaces:
Runtime error
Runtime error
| 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") | |