Spaces:
Sleeping
Sleeping
File size: 920 Bytes
bc3f652 16f9689 bc3f652 59e4843 bc3f652 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | """Publish with HF_TOKEN or an existing Hugging Face login; never store tokens here."""
from pathlib import Path
from huggingface_hub import HfApi
if __name__ == '__main__':
api = HfApi()
repo = f"{api.whoami()['name']}/speaking-midi"
api.create_repo(repo, repo_type='space', space_sdk='gradio', space_hardware='zero-a10g', exist_ok=True)
api.add_space_variable(repo, 'INFERENCE_DEVICE', 'zerogpu')
commit = api.upload_folder(repo_id=repo, repo_type='space', folder_path=Path(__file__).parent,
allow_patterns=['app.py', 'player.py', 'ui/*', 'zero_tts.py', 'deploy.py', 'README.md', 'VALIDATION.md', 'requirements.txt', 'packages.txt',
'.gitignore', 'speaking_midi/*.py', 'scripts/*.py', 'tests/*.py',
'assets/*', 'examples/**'],
commit_message='Build CPU-capable Speaking MIDI audio and VoiceDesign demo')
print(commit.commit_url)
|