Spaces:
Sleeping
Sleeping
Update app.py
Browse filesUpdated model download method
app.py
CHANGED
@@ -1,9 +1,13 @@
|
|
1 |
from fastai.vision.all import *
|
2 |
-
from huggingface_hub import
|
|
|
3 |
import gradio as gr
|
4 |
import skimage
|
5 |
|
6 |
-
learn = from_pretrained_fastai("fastai/ohmeow_chapter_02")
|
|
|
|
|
|
|
7 |
|
8 |
labels = learn.dls.vocab
|
9 |
def predict(img):
|
|
|
1 |
from fastai.vision.all import *
|
2 |
+
from huggingface_hub import from_pretrained_fastai, hf_hub_download
|
3 |
+
from fastai.learner import load_learner
|
4 |
import gradio as gr
|
5 |
import skimage
|
6 |
|
7 |
+
#learn = from_pretrained_fastai("fastai/ohmeow_chapter_02")
|
8 |
+
learn = load_learner(
|
9 |
+
hf_hub_download("fastai/ohmeow_chapter_02", "model.pkl")
|
10 |
+
)
|
11 |
|
12 |
labels = learn.dls.vocab
|
13 |
def predict(img):
|