sigridjineth's picture
Upload folder using huggingface_hub
e8ae107 verified
raw
history blame contribute delete
569 Bytes
from huggingface_hub import HfApi, HfFolder
# ํ† ํฐ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ
token = HfFolder.get_token()
# HfApi ์ธ์Šคํ„ด์Šค ์ƒ์„ฑ
api = HfApi()
# ์—…๋กœ๋“œํ•  ๊ฒฝ๋กœ์™€ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ ์„ค์ •
folder_path = "." # ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ(./reranker-data) ๋‚ด ๋ชจ๋“  ํŒŒ์ผ/ํด๋”
repo_id = "sigridjineth/ModernBERT-Korean-ColBERT-preview-v1"
repo_type = "model" # model, dataset, space ์ค‘ ์„ ํƒ. ํ•ด๋‹น ๋ฆฌํฌ์ง€ํ† ๋ฆฌ ํƒ€์ž…์— ๋งž๊ฒŒ ์กฐ์ •
# ํด๋” ์—…๋กœ๋“œ
api.upload_folder(
folder_path=folder_path,
repo_id=repo_id,
repo_type=repo_type,
token=token
)