Spaces:
Sleeping
Sleeping
NekoNeko512
commited on
Commit
·
bc4058f
1
Parent(s):
e9fd37b
migrate to hf fastai
Browse files
app.py
CHANGED
@@ -5,12 +5,13 @@ __all__ = ['learner', 'classes', 'examples', 'interface', 'is_cat', 'predict']
|
|
5 |
|
6 |
# %% ../02x-prototype_gradio_interface.ipynb 1
|
7 |
import gradio as gr
|
|
|
8 |
from fastai.vision.all import *
|
9 |
def is_cat(x):
|
10 |
return x[0].isupper()
|
11 |
|
12 |
# %% ../02x-prototype_gradio_interface.ipynb 2
|
13 |
-
learner =
|
14 |
|
15 |
# %% ../02x-prototype_gradio_interface.ipynb 5
|
16 |
classes = ('Dog', 'Cat')
|
|
|
5 |
|
6 |
# %% ../02x-prototype_gradio_interface.ipynb 1
|
7 |
import gradio as gr
|
8 |
+
from huggingface_hub import from_pretrained_fastai
|
9 |
from fastai.vision.all import *
|
10 |
def is_cat(x):
|
11 |
return x[0].isupper()
|
12 |
|
13 |
# %% ../02x-prototype_gradio_interface.ipynb 2
|
14 |
+
learner = from_pretrained_fastai('model.pkl')
|
15 |
|
16 |
# %% ../02x-prototype_gradio_interface.ipynb 5
|
17 |
classes = ('Dog', 'Cat')
|