embedding / download_model.py
jwlee-ai's picture
test
e9502c9
raw
history blame contribute delete
528 Bytes
import os
from huggingface_hub import snapshot_download
def download_bge_model():
# ๋ชจ๋ธ ์ €์žฅ ๊ฒฝ๋กœ ์„ค์ •
model_path = "./ai_models/hf/BGE-m3-ko"
# ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ ์—†์œผ๋ฉด ์ƒ์„ฑ
os.makedirs(model_path, exist_ok=True)
# ๋ชจ๋ธ ๋‹ค์šด๋กœ๋“œ
snapshot_download(
repo_id="dragonkue/BGE-m3-ko",
local_dir=model_path,
revision="main"
)
print(f"๋ชจ๋ธ์ด {model_path}์— ๋‹ค์šด๋กœ๋“œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.")
if __name__ == "__main__":
download_bge_model()