metin2-private-server / scripts /push_to_hf.py
manus4oHER's picture
Upload folder using huggingface_hub
65b3647 verified
Raw
History Blame Contribute Delete
1.08 kB
"""Upload metin2_private_server project to Hugging Face."""
from pathlib import Path
from huggingface_hub import HfApi, create_repo
REPO_ID = "manus4oHER/metin2-private-server"
ROOT = Path(r"C:\Users\User\metin2_private_server")
def main() -> None:
api = HfApi()
create_repo(REPO_ID, repo_type="model", exist_ok=True, private=False)
print(f"Uploading {ROOT} -> {REPO_ID} ...")
api.upload_folder(
folder_path=str(ROOT),
repo_id=REPO_ID,
repo_type="model",
ignore_patterns=[
".git/**",
"**/node_modules/**",
"**/runtime/**",
"runtime/**",
"**/bin/**",
"**/obj/**",
"**/.vs/**",
"**/tools/animation/**",
"**/__pycache__/**",
"**/*.pdb",
"**/TestResults/**",
"mysqld_err.log",
"**/*.err",
"**/*.pid",
"**/ibtmp1",
"**/ib_logfile0",
],
)
print(f"Done: https://huggingface.co/{REPO_ID}")
if __name__ == "__main__":
main()