Spaces:
Sleeping
Sleeping
danielmartinec
commited on
Commit
•
eac3300
1
Parent(s):
1e3bd58
Fixing the order of categories
Browse files
app.ipynb
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
-
"execution_count":
|
6 |
"id": "61e04301-38df-4884-b6a5-22c9ea0b8f42",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
@@ -12,7 +12,7 @@
|
|
12 |
},
|
13 |
{
|
14 |
"cell_type": "code",
|
15 |
-
"execution_count":
|
16 |
"id": "eea0a34c-610b-4cda-a0d0-d33fc5a4d8c6",
|
17 |
"metadata": {},
|
18 |
"outputs": [],
|
@@ -24,7 +24,7 @@
|
|
24 |
},
|
25 |
{
|
26 |
"cell_type": "code",
|
27 |
-
"execution_count":
|
28 |
"id": "56b1b84c-124c-4a00-b3a9-825a73b3176c",
|
29 |
"metadata": {},
|
30 |
"outputs": [
|
@@ -49,7 +49,7 @@
|
|
49 |
},
|
50 |
{
|
51 |
"cell_type": "code",
|
52 |
-
"execution_count":
|
53 |
"id": "64fb2afb-d5ae-4fe9-8ede-f269fc731277",
|
54 |
"metadata": {},
|
55 |
"outputs": [],
|
@@ -60,7 +60,7 @@
|
|
60 |
},
|
61 |
{
|
62 |
"cell_type": "code",
|
63 |
-
"execution_count":
|
64 |
"id": "458d4f3f-44c7-40d1-b3f4-ec32505bcd3e",
|
65 |
"metadata": {},
|
66 |
"outputs": [
|
@@ -118,13 +118,13 @@
|
|
118 |
},
|
119 |
{
|
120 |
"cell_type": "code",
|
121 |
-
"execution_count":
|
122 |
"id": "a8b789a2-2333-44ad-b786-ba8d85cc9225",
|
123 |
"metadata": {},
|
124 |
"outputs": [],
|
125 |
"source": [
|
126 |
"#|export\n",
|
127 |
-
"categories = ('
|
128 |
"\n",
|
129 |
"def classify_image(im):\n",
|
130 |
" pred, idx, probs = learn.predict(im)\n",
|
@@ -133,7 +133,7 @@
|
|
133 |
},
|
134 |
{
|
135 |
"cell_type": "code",
|
136 |
-
"execution_count":
|
137 |
"id": "1faf012d-8159-4aae-b3a9-9c17751fc187",
|
138 |
"metadata": {},
|
139 |
"outputs": [
|
@@ -193,7 +193,7 @@
|
|
193 |
},
|
194 |
{
|
195 |
"cell_type": "code",
|
196 |
-
"execution_count":
|
197 |
"id": "5e10c092-c82d-4d85-8cb9-c7dc791269fc",
|
198 |
"metadata": {},
|
199 |
"outputs": [
|
@@ -264,7 +264,7 @@
|
|
264 |
},
|
265 |
{
|
266 |
"cell_type": "code",
|
267 |
-
"execution_count":
|
268 |
"id": "2017b1ba-f8d3-4a1d-98da-f52ce147df14",
|
269 |
"metadata": {},
|
270 |
"outputs": [],
|
@@ -274,7 +274,7 @@
|
|
274 |
},
|
275 |
{
|
276 |
"cell_type": "code",
|
277 |
-
"execution_count":
|
278 |
"id": "9e1976f1-79bb-496a-85e0-107766999c62",
|
279 |
"metadata": {},
|
280 |
"outputs": [],
|
@@ -284,7 +284,7 @@
|
|
284 |
},
|
285 |
{
|
286 |
"cell_type": "code",
|
287 |
-
"execution_count":
|
288 |
"id": "ca8e3d8d-44ab-4d9b-be1b-62735cd85c63",
|
289 |
"metadata": {},
|
290 |
"outputs": [],
|
@@ -294,7 +294,7 @@
|
|
294 |
},
|
295 |
{
|
296 |
"cell_type": "code",
|
297 |
-
"execution_count":
|
298 |
"id": "098fb721-a743-4cb7-aebd-2b50c338371a",
|
299 |
"metadata": {},
|
300 |
"outputs": [
|
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
+
"execution_count": null,
|
6 |
"id": "61e04301-38df-4884-b6a5-22c9ea0b8f42",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
|
|
12 |
},
|
13 |
{
|
14 |
"cell_type": "code",
|
15 |
+
"execution_count": null,
|
16 |
"id": "eea0a34c-610b-4cda-a0d0-d33fc5a4d8c6",
|
17 |
"metadata": {},
|
18 |
"outputs": [],
|
|
|
24 |
},
|
25 |
{
|
26 |
"cell_type": "code",
|
27 |
+
"execution_count": null,
|
28 |
"id": "56b1b84c-124c-4a00-b3a9-825a73b3176c",
|
29 |
"metadata": {},
|
30 |
"outputs": [
|
|
|
49 |
},
|
50 |
{
|
51 |
"cell_type": "code",
|
52 |
+
"execution_count": null,
|
53 |
"id": "64fb2afb-d5ae-4fe9-8ede-f269fc731277",
|
54 |
"metadata": {},
|
55 |
"outputs": [],
|
|
|
60 |
},
|
61 |
{
|
62 |
"cell_type": "code",
|
63 |
+
"execution_count": null,
|
64 |
"id": "458d4f3f-44c7-40d1-b3f4-ec32505bcd3e",
|
65 |
"metadata": {},
|
66 |
"outputs": [
|
|
|
118 |
},
|
119 |
{
|
120 |
"cell_type": "code",
|
121 |
+
"execution_count": null,
|
122 |
"id": "a8b789a2-2333-44ad-b786-ba8d85cc9225",
|
123 |
"metadata": {},
|
124 |
"outputs": [],
|
125 |
"source": [
|
126 |
"#|export\n",
|
127 |
+
"categories = ('black', 'grizzly', 'teddy')\n",
|
128 |
"\n",
|
129 |
"def classify_image(im):\n",
|
130 |
" pred, idx, probs = learn.predict(im)\n",
|
|
|
133 |
},
|
134 |
{
|
135 |
"cell_type": "code",
|
136 |
+
"execution_count": null,
|
137 |
"id": "1faf012d-8159-4aae-b3a9-9c17751fc187",
|
138 |
"metadata": {},
|
139 |
"outputs": [
|
|
|
193 |
},
|
194 |
{
|
195 |
"cell_type": "code",
|
196 |
+
"execution_count": null,
|
197 |
"id": "5e10c092-c82d-4d85-8cb9-c7dc791269fc",
|
198 |
"metadata": {},
|
199 |
"outputs": [
|
|
|
264 |
},
|
265 |
{
|
266 |
"cell_type": "code",
|
267 |
+
"execution_count": null,
|
268 |
"id": "2017b1ba-f8d3-4a1d-98da-f52ce147df14",
|
269 |
"metadata": {},
|
270 |
"outputs": [],
|
|
|
274 |
},
|
275 |
{
|
276 |
"cell_type": "code",
|
277 |
+
"execution_count": null,
|
278 |
"id": "9e1976f1-79bb-496a-85e0-107766999c62",
|
279 |
"metadata": {},
|
280 |
"outputs": [],
|
|
|
284 |
},
|
285 |
{
|
286 |
"cell_type": "code",
|
287 |
+
"execution_count": null,
|
288 |
"id": "ca8e3d8d-44ab-4d9b-be1b-62735cd85c63",
|
289 |
"metadata": {},
|
290 |
"outputs": [],
|
|
|
294 |
},
|
295 |
{
|
296 |
"cell_type": "code",
|
297 |
+
"execution_count": null,
|
298 |
"id": "098fb721-a743-4cb7-aebd-2b50c338371a",
|
299 |
"metadata": {},
|
300 |
"outputs": [
|
app.py
CHANGED
@@ -11,7 +11,7 @@ import gradio as gr
|
|
11 |
learn = load_learner('export.pkl')
|
12 |
|
13 |
# %% ../app.ipynb 5
|
14 |
-
categories = ('
|
15 |
|
16 |
def classify_image(im):
|
17 |
pred, idx, probs = learn.predict(im)
|
|
|
11 |
learn = load_learner('export.pkl')
|
12 |
|
13 |
# %% ../app.ipynb 5
|
14 |
+
categories = ('black', 'grizzly', 'teddy')
|
15 |
|
16 |
def classify_image(im):
|
17 |
pred, idx, probs = learn.predict(im)
|