Spaces:
Runtime error
Runtime error
| 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) | |