altamira / deploy.py
kenqtade's picture
Fix OAuth and Auth flow
38ae6b8
Raw
History Blame Contribute Delete
659 Bytes
import os
from huggingface_hub import HfApi
def deploy():
# Configuration
repo_id = os.environ.get("HF_SPACE_ID", "kenqtade/altamira-orchestrator")
token = os.environ.get("HF_TOKEN")
folder_path = "app" # Path to the app directory
if not token:
print("Error: HF_TOKEN environment variable is not set")
return
api = HfApi(token=token)
print(f"Uploading {folder_path} to {repo_id}...")
api.upload_folder(
folder_path=folder_path,
repo_id=repo_id,
repo_type="space",
path_in_repo="app",
)
print("Deployment successful!")
if __name__ == "__main__":
deploy()