zems / download_model.py
tatendachirume's picture
Update download_model.py
2e635b9 verified
from huggingface_hub import hf_hub_download
import os
# Create models directory if it doesn't exist
os.makedirs("models", exist_ok=True)
# Download the model file from tatendachirume/zems repository
print("Downloading model from tatendachirume/zems repository...")
print("This may take some time depending on your internet connection and the model size.")
try:
model_path = hf_hub_download(
repo_id="tatendachirume/zems",
filename="MedGenius_LLaMA-3.2B.Q8_0.gguf",
local_dir="./models"
)
print("\nโœ… Model downloaded successfully!")
print(f"๐Ÿ“‚ File saved to: {model_path}")
print("\nYou can now run the application with:")
print("streamlit run app.py")
except Exception as e:
print(f"\nโŒ Error downloading the model: {e}")
print("\nIf you're encountering issues, try the following:")
print("1. Make sure you have a stable internet connection")
print("2. Verify that the model file exists at: https://huggingface.co/tatendachirume/zems/blob/main/MedGenius_LLaMA-3.2B.Q8_0.gguf")
print("3. Try logging in to Hugging Face: huggingface-cli login")