Spaces:
Runtime error
Runtime error
Commit
·
e6877e8
1
Parent(s):
6276a9d
added fastbook import
Browse files
app.py
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
from fastai.vision import *
|
2 |
import gradio as gr
|
3 |
from pathlib import Path
|
|
|
|
|
|
|
|
|
4 |
|
5 |
learn = load_learner('cloudmodel.pk1')
|
6 |
|
@@ -20,8 +24,7 @@ categories = (
|
|
20 |
|
21 |
image = gr.inputs.Image(shape=(192,192))
|
22 |
label = gr.outputs.Label()
|
23 |
-
|
24 |
-
image_path = Path('images')
|
25 |
learn = load_learner(model_path/'cloudmodel.pk1')
|
26 |
examples = [image_path / f"{c}.jpg" for c in categories]
|
27 |
|
|
|
1 |
from fastai.vision import *
|
2 |
import gradio as gr
|
3 |
from pathlib import Path
|
4 |
+
from fastbook import load_learner
|
5 |
+
|
6 |
+
model_path = Path('models')
|
7 |
+
image_path = Path('images')
|
8 |
|
9 |
learn = load_learner('cloudmodel.pk1')
|
10 |
|
|
|
24 |
|
25 |
image = gr.inputs.Image(shape=(192,192))
|
26 |
label = gr.outputs.Label()
|
27 |
+
|
|
|
28 |
learn = load_learner(model_path/'cloudmodel.pk1')
|
29 |
examples = [image_path / f"{c}.jpg" for c in categories]
|
30 |
|