File size: 564 Bytes
6c55db2 8e2aece 6c55db2 8e2aece 7867009 6c55db2 8e2aece 6c55db2 7867009 8e2aece 7867009 6c55db2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
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)
|