DeeDe / model /download_model.py
Uunan's picture
Update model/download_model.py
7867009 verified
from huggingface_hub import hf_hub_download
import os
import shutil
MODEL_NAME = "qwen2.5-7b-instruct-q4_k_m.gguf" # %100 DOĞRU
REPO_ID = "Qwen/Qwen2.5-7B-Instruct-GGUF"
TARGET_DIR = "./model"
TARGET_PATH = f"{TARGET_DIR}/{MODEL_NAME}"
print("Model indiriliyor...")
downloaded_path = hf_hub_download(
repo_id=REPO_ID,
filename=MODEL_NAME,
local_dir=TARGET_DIR
)
# HF cache’den model klasörüne taşı
if downloaded_path != TARGET_PATH:
shutil.move(downloaded_path, TARGET_PATH)
print("Model indirildi!")
print("Model yolu:", TARGET_PATH)