mnist-custom-keras-model / download-h5-model.py
Manu
scripts to download models from the repository
b06662f
raw
history blame contribute delete
491 Bytes
import requests
import os
from icecream import ic
# URL del modelo
url = "https://huggingface.co/manufy/mnist_model_keras/blob/main/keras/mnist_model.keras"
# Crear la carpeta 'models' si no existe
if not os.path.exists('downloaded_models'):
os.makedirs('downloaded_models')
# Descargar el archivo del modelo
ic("Descargando modelo...")
r = requests.get(url, allow_redirects=True)
open('downloaded_models/mnist_model.h5', 'wb').write(r.content)
ic("Modelo descargado con éxito")