File size: 405 Bytes
0a6d9bf
 
4487feb
 
 
 
 
 
8f7473d
0a6d9bf
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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)