Spaces:
Runtime error
Runtime error
import urllib.request | |
from pathlib import Path | |
import os | |
from fastai.vision import load_learner | |
def download_model(url: str, filename: str): | |
urllib.request.urlretrieve(url, filename) | |
def load_model(model_path: str): | |
path = Path(".") | |
learn = load_learner(path, model_path) | |
return learn | |
if __name__ == "__main__": | |
MODEL_URL = "https://www.dropbox.com/s/04suaimdpru76h3/ArtLine_920.pkl?dl=1" | |
MODEL_FILENAME = "ArtLine_920.pkl" | |
download_model(MODEL_URL, MODEL_FILENAME) | |