Spaces:
Sleeping
Sleeping
File size: 457 Bytes
98bf2c9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import os
from huggingface_hub import hf_hub_download
def download_model_from_hub(repo_id, filename):
"""Download model from Hugging Face Hub"""
return hf_hub_download(
repo_id=repo_id,
filename=filename,
token=os.getenv("HF_TOKEN") # Optional: if models are private
)
# Model paths
PARTS_MODEL_PATH = download_model_from_hub(
"AItoolstack/car_damage_detection",
"yolov8_models/parts/weights/weights/best.pt"
) |