Spaces:
Runtime error
Runtime error
Brian Sigafoos
commited on
Commit
•
9dc272e
1
Parent(s):
be10678
Improve #| comments
Browse files- app.ipynb +4 -4
- app.py +0 -2
- model.ipynb +9 -1
app.ipynb
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
"metadata": {},
|
26 |
"outputs": [],
|
27 |
"source": [
|
28 |
-
"
|
29 |
"from fastai.vision.all import *\n",
|
30 |
"import gradio as gr"
|
31 |
]
|
@@ -36,7 +36,7 @@
|
|
36 |
"metadata": {},
|
37 |
"outputs": [],
|
38 |
"source": [
|
39 |
-
"
|
40 |
"learn = load_learner('model.pkl')"
|
41 |
]
|
42 |
},
|
@@ -75,7 +75,7 @@
|
|
75 |
"metadata": {},
|
76 |
"outputs": [],
|
77 |
"source": [
|
78 |
-
"
|
79 |
"\n",
|
80 |
"categories = ('ash', 'chestnut', 'ginkgo biloba', 'silver maple', 'willow oak')\n",
|
81 |
"\n",
|
@@ -109,7 +109,7 @@
|
|
109 |
"metadata": {},
|
110 |
"outputs": [],
|
111 |
"source": [
|
112 |
-
"
|
113 |
"image = gr.inputs.Image(shape=(192, 192))\n",
|
114 |
"label = gr.outputs.Label()\n",
|
115 |
"examples = ['images/ash.jpg', 'images/chestnut.jpg', 'images/ginkgo_biloba.jpg',\n",
|
25 |
"metadata": {},
|
26 |
"outputs": [],
|
27 |
"source": [
|
28 |
+
"#|export\n",
|
29 |
"from fastai.vision.all import *\n",
|
30 |
"import gradio as gr"
|
31 |
]
|
36 |
"metadata": {},
|
37 |
"outputs": [],
|
38 |
"source": [
|
39 |
+
"#|export\n",
|
40 |
"learn = load_learner('model.pkl')"
|
41 |
]
|
42 |
},
|
75 |
"metadata": {},
|
76 |
"outputs": [],
|
77 |
"source": [
|
78 |
+
"#|export\n",
|
79 |
"\n",
|
80 |
"categories = ('ash', 'chestnut', 'ginkgo biloba', 'silver maple', 'willow oak')\n",
|
81 |
"\n",
|
109 |
"metadata": {},
|
110 |
"outputs": [],
|
111 |
"source": [
|
112 |
+
"#|export\n",
|
113 |
"image = gr.inputs.Image(shape=(192, 192))\n",
|
114 |
"label = gr.outputs.Label()\n",
|
115 |
"examples = ['images/ash.jpg', 'images/chestnut.jpg', 'images/ginkgo_biloba.jpg',\n",
|
app.py
CHANGED
@@ -8,11 +8,9 @@ __all__ = ['learn', 'categories', 'image', 'label',
|
|
8 |
from fastai.vision.all import *
|
9 |
import gradio as gr
|
10 |
|
11 |
-
|
12 |
# %% app.ipynb 3
|
13 |
learn = load_learner('model.pkl')
|
14 |
|
15 |
-
|
16 |
# %% app.ipynb 7
|
17 |
categories = ('ash', 'chestnut', 'ginkgo biloba', 'silver maple', 'willow oak')
|
18 |
|
8 |
from fastai.vision.all import *
|
9 |
import gradio as gr
|
10 |
|
|
|
11 |
# %% app.ipynb 3
|
12 |
learn = load_learner('model.pkl')
|
13 |
|
|
|
14 |
# %% app.ipynb 7
|
15 |
categories = ('ash', 'chestnut', 'ginkgo biloba', 'silver maple', 'willow oak')
|
16 |
|
model.ipynb
CHANGED
@@ -1,8 +1,16 @@
|
|
1 |
{
|
2 |
"cells": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
-
"execution_count":
|
6 |
"metadata": {},
|
7 |
"outputs": [],
|
8 |
"source": [
|
1 |
{
|
2 |
"cells": [
|
3 |
+
{
|
4 |
+
"attachments": {},
|
5 |
+
"cell_type": "markdown",
|
6 |
+
"metadata": {},
|
7 |
+
"source": [
|
8 |
+
"Source: https://course.fast.ai/Lessons/lesson2.html"
|
9 |
+
]
|
10 |
+
},
|
11 |
{
|
12 |
"cell_type": "code",
|
13 |
+
"execution_count": 27,
|
14 |
"metadata": {},
|
15 |
"outputs": [],
|
16 |
"source": [
|