bear_classifier / app.py
MichaelKonu's picture
Update app.py
8f7473d
raw
history blame contribute delete
405 Bytes
from huggingface_hub import hf_hub_download
from fastai.learner import load_learner
# Function to load model
def load_model(model_path):
learn = load_learner(model_path)
return learn
# Download the model file
model_file = hf_hub_download(
repo_id="MichaelKonu/MoneyMike",
filename="model.pkl"
)
# Now you can load the model from the downloaded file
learn = load_model(model_file)