ktongue/docker_container / SGAE /upload_fix.py
download
raw
765 Bytes
from huggingface_hub import HfApi
api = HfApi(token="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")
repo_id = "ktongue/sgae-app"
files = [
("/root/SGAE/entrypoint.sh", "entrypoint.sh"),
("/root/SGAE/app/Http/Middleware/TrustProxies.php", "app/Http/Middleware/TrustProxies.php"),
]
# Upload all files in a single commit to avoid multiple rebuilds
operations = []
from huggingface_hub import CommitOperationAdd
for local_path, repo_path in files:
operations.append(
CommitOperationAdd(path_in_repo=repo_path, path_or_fileobj=local_path)
)
api.create_commit(
repo_id=repo_id,
repo_type="space",
operations=operations,
commit_message="Fix entrypoint, permissions, and TrustProxies",
)
print("All files uploaded in single commit!")

Xet Storage Details

Size:
765 Bytes
·
Xet hash:
99ad3cbd4c73667861b51138215da0b164c3cd2fd4bfe46ab124e0dffe30e9be

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.