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