Spaces:
Sleeping
Sleeping
Dstd90
commited on
Commit
·
47a7343
1
Parent(s):
ecb9997
model out
Browse files
app.ipynb
CHANGED
@@ -2,9 +2,18 @@
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
-
"execution_count":
|
6 |
"metadata": {},
|
7 |
-
"outputs": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
"source": [
|
9 |
"from fastai.vision.all import load_learner\n",
|
10 |
"from fastai.vision.all import PILImage\n",
|
@@ -13,7 +22,7 @@
|
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
-
"execution_count":
|
17 |
"metadata": {},
|
18 |
"outputs": [],
|
19 |
"source": [
|
@@ -24,16 +33,16 @@
|
|
24 |
},
|
25 |
{
|
26 |
"cell_type": "code",
|
27 |
-
"execution_count":
|
28 |
"metadata": {},
|
29 |
"outputs": [],
|
30 |
"source": [
|
31 |
-
"model = load_learner('
|
32 |
]
|
33 |
},
|
34 |
{
|
35 |
"cell_type": "code",
|
36 |
-
"execution_count":
|
37 |
"metadata": {},
|
38 |
"outputs": [],
|
39 |
"source": [
|
@@ -102,7 +111,7 @@
|
|
102 |
}
|
103 |
],
|
104 |
"source": [
|
105 |
-
"img = PILImage.create(f'
|
106 |
"img.thumbnail((192,192))\n",
|
107 |
"img"
|
108 |
]
|
@@ -141,14 +150,7 @@
|
|
141 |
},
|
142 |
{
|
143 |
"data": {
|
144 |
-
"text/html": [
|
145 |
-
"\n",
|
146 |
-
" <div>\n",
|
147 |
-
" <progress value='0' class='' max='1' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
|
148 |
-
" 0.00% [0/1 00:00<?]\n",
|
149 |
-
" </div>\n",
|
150 |
-
" "
|
151 |
-
],
|
152 |
"text/plain": [
|
153 |
"<IPython.core.display.HTML object>"
|
154 |
]
|
@@ -227,13 +229,13 @@
|
|
227 |
"name": "stderr",
|
228 |
"output_type": "stream",
|
229 |
"text": [
|
230 |
-
"C:\\Users\\USER\\AppData\\Local\\Temp\\
|
231 |
" image = gr.inputs.Image(shape=(192,192))\n",
|
232 |
-
"C:\\Users\\USER\\AppData\\Local\\Temp\\
|
233 |
" image = gr.inputs.Image(shape=(192,192))\n",
|
234 |
-
"C:\\Users\\USER\\AppData\\Local\\Temp\\
|
235 |
" label = gr.outputs.Label(num_top_classes=5)\n",
|
236 |
-
"C:\\Users\\USER\\AppData\\Local\\Temp\\
|
237 |
" label = gr.outputs.Label(num_top_classes=5)\n"
|
238 |
]
|
239 |
},
|
@@ -241,8 +243,8 @@
|
|
241 |
"name": "stdout",
|
242 |
"output_type": "stream",
|
243 |
"text": [
|
244 |
-
"Running on local URL: http://127.0.0.1:
|
245 |
-
"Running on public URL: https://
|
246 |
"\n",
|
247 |
"This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n"
|
248 |
]
|
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
+
"execution_count": 1,
|
6 |
"metadata": {},
|
7 |
+
"outputs": [
|
8 |
+
{
|
9 |
+
"name": "stderr",
|
10 |
+
"output_type": "stream",
|
11 |
+
"text": [
|
12 |
+
"c:\\Users\\USER\\Desktop\\WorkSpace\\MasterCourse\\scripts\\capstone project 2\\Shoe-Type-Recognizer\\venv\\lib\\site-packages\\tqdm\\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
|
13 |
+
" from .autonotebook import tqdm as notebook_tqdm\n"
|
14 |
+
]
|
15 |
+
}
|
16 |
+
],
|
17 |
"source": [
|
18 |
"from fastai.vision.all import load_learner\n",
|
19 |
"from fastai.vision.all import PILImage\n",
|
|
|
22 |
},
|
23 |
{
|
24 |
"cell_type": "code",
|
25 |
+
"execution_count": 3,
|
26 |
"metadata": {},
|
27 |
"outputs": [],
|
28 |
"source": [
|
|
|
33 |
},
|
34 |
{
|
35 |
"cell_type": "code",
|
36 |
+
"execution_count": 4,
|
37 |
"metadata": {},
|
38 |
"outputs": [],
|
39 |
"source": [
|
40 |
+
"model = load_learner('shoes-recognizer-v4.pkl')"
|
41 |
]
|
42 |
},
|
43 |
{
|
44 |
"cell_type": "code",
|
45 |
+
"execution_count": 5,
|
46 |
"metadata": {},
|
47 |
"outputs": [],
|
48 |
"source": [
|
|
|
111 |
}
|
112 |
],
|
113 |
"source": [
|
114 |
+
"img = PILImage.create(f'image-01.jpg')\n",
|
115 |
"img.thumbnail((192,192))\n",
|
116 |
"img"
|
117 |
]
|
|
|
150 |
},
|
151 |
{
|
152 |
"data": {
|
153 |
+
"text/html": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
"text/plain": [
|
155 |
"<IPython.core.display.HTML object>"
|
156 |
]
|
|
|
229 |
"name": "stderr",
|
230 |
"output_type": "stream",
|
231 |
"text": [
|
232 |
+
"C:\\Users\\USER\\AppData\\Local\\Temp\\ipykernel_27716\\498370115.py:1: GradioDeprecationWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components\n",
|
233 |
" image = gr.inputs.Image(shape=(192,192))\n",
|
234 |
+
"C:\\Users\\USER\\AppData\\Local\\Temp\\ipykernel_27716\\498370115.py:1: GradioDeprecationWarning: `optional` parameter is deprecated, and it has no effect\n",
|
235 |
" image = gr.inputs.Image(shape=(192,192))\n",
|
236 |
+
"C:\\Users\\USER\\AppData\\Local\\Temp\\ipykernel_27716\\498370115.py:2: GradioDeprecationWarning: Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components\n",
|
237 |
" label = gr.outputs.Label(num_top_classes=5)\n",
|
238 |
+
"C:\\Users\\USER\\AppData\\Local\\Temp\\ipykernel_27716\\498370115.py:2: GradioUnusedKwargWarning: You have unused kwarg parameters in Label, please remove them: {'type': 'auto'}\n",
|
239 |
" label = gr.outputs.Label(num_top_classes=5)\n"
|
240 |
]
|
241 |
},
|
|
|
243 |
"name": "stdout",
|
244 |
"output_type": "stream",
|
245 |
"text": [
|
246 |
+
"Running on local URL: http://127.0.0.1:7862\n",
|
247 |
+
"Running on public URL: https://03b7f2d43d8c98bf5d.gradio.live\n",
|
248 |
"\n",
|
249 |
"This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n"
|
250 |
]
|
models/shoes-recognizer-v4.pkl → shoes-recognizer-v4.pkl
RENAMED
File without changes
|