Spaces:
Running
Running
Dstd90
commited on
Commit
·
9065a7a
1
Parent(s):
348515d
deugged with posixpath
Browse files
app.ipynb
CHANGED
@@ -2,18 +2,9 @@
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
-
"execution_count":
|
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,13 +13,13 @@
|
|
22 |
},
|
23 |
{
|
24 |
"cell_type": "code",
|
25 |
-
"execution_count":
|
26 |
"metadata": {},
|
27 |
"outputs": [],
|
28 |
"source": [
|
29 |
-
"
|
30 |
-
"
|
31 |
-
"
|
32 |
]
|
33 |
},
|
34 |
{
|
@@ -229,29 +220,29 @@
|
|
229 |
},
|
230 |
{
|
231 |
"cell_type": "code",
|
232 |
-
"execution_count":
|
233 |
"metadata": {},
|
234 |
"outputs": [
|
235 |
{
|
236 |
"name": "stderr",
|
237 |
"output_type": "stream",
|
238 |
"text": [
|
239 |
-
"C:\\Users\\USER\\AppData\\Local\\Temp\\ipykernel_22668\\
|
240 |
" image = gr.inputs.Image(shape=(192,192))\n",
|
241 |
-
"C:\\Users\\USER\\AppData\\Local\\Temp\\ipykernel_22668\\
|
242 |
" image = gr.inputs.Image(shape=(192,192))\n",
|
243 |
-
"C:\\Users\\USER\\AppData\\Local\\Temp\\ipykernel_22668\\
|
244 |
-
" label = gr.outputs.Label()\n",
|
245 |
-
"C:\\Users\\USER\\AppData\\Local\\Temp\\ipykernel_22668\\
|
246 |
-
" label = gr.outputs.Label()\n"
|
247 |
]
|
248 |
},
|
249 |
{
|
250 |
"name": "stdout",
|
251 |
"output_type": "stream",
|
252 |
"text": [
|
253 |
-
"Running on local URL: http://127.0.0.1:
|
254 |
-
"Running on public URL: https://
|
255 |
"\n",
|
256 |
"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"
|
257 |
]
|
@@ -260,7 +251,7 @@
|
|
260 |
"data": {
|
261 |
"text/plain": []
|
262 |
},
|
263 |
-
"execution_count":
|
264 |
"metadata": {},
|
265 |
"output_type": "execute_result"
|
266 |
},
|
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
+
"execution_count": 7,
|
6 |
"metadata": {},
|
7 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
"source": [
|
9 |
"from fastai.vision.all import load_learner\n",
|
10 |
"from fastai.vision.all import PILImage\n",
|
|
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
+
"execution_count": 6,
|
17 |
"metadata": {},
|
18 |
"outputs": [],
|
19 |
"source": [
|
20 |
+
"import pathlib\n",
|
21 |
+
"temp = pathlib.PosixPath\n",
|
22 |
+
"pathlib.PosixPath = pathlib.WindowsPath"
|
23 |
]
|
24 |
},
|
25 |
{
|
|
|
220 |
},
|
221 |
{
|
222 |
"cell_type": "code",
|
223 |
+
"execution_count": 12,
|
224 |
"metadata": {},
|
225 |
"outputs": [
|
226 |
{
|
227 |
"name": "stderr",
|
228 |
"output_type": "stream",
|
229 |
"text": [
|
230 |
+
"C:\\Users\\USER\\AppData\\Local\\Temp\\ipykernel_22668\\2435798682.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",
|
231 |
" image = gr.inputs.Image(shape=(192,192))\n",
|
232 |
+
"C:\\Users\\USER\\AppData\\Local\\Temp\\ipykernel_22668\\2435798682.py:1: GradioDeprecationWarning: `optional` parameter is deprecated, and it has no effect\n",
|
233 |
" image = gr.inputs.Image(shape=(192,192))\n",
|
234 |
+
"C:\\Users\\USER\\AppData\\Local\\Temp\\ipykernel_22668\\2435798682.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",
|
235 |
+
" label = gr.outputs.Label(num_top_classes=5)\n",
|
236 |
+
"C:\\Users\\USER\\AppData\\Local\\Temp\\ipykernel_22668\\2435798682.py:2: GradioUnusedKwargWarning: You have unused kwarg parameters in Label, please remove them: {'type': 'auto'}\n",
|
237 |
+
" label = gr.outputs.Label(num_top_classes=5)\n"
|
238 |
]
|
239 |
},
|
240 |
{
|
241 |
"name": "stdout",
|
242 |
"output_type": "stream",
|
243 |
"text": [
|
244 |
+
"Running on local URL: http://127.0.0.1:7862\n",
|
245 |
+
"Running on public URL: https://1d7a8a767e9de0e063.gradio.live\n",
|
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 |
]
|
|
|
251 |
"data": {
|
252 |
"text/plain": []
|
253 |
},
|
254 |
+
"execution_count": 12,
|
255 |
"metadata": {},
|
256 |
"output_type": "execute_result"
|
257 |
},
|
app.py
CHANGED
@@ -2,6 +2,9 @@ import gradio as gr
|
|
2 |
from fastai.vision.all import load_learner
|
3 |
from fastai.vision.all import PILImage
|
4 |
|
|
|
|
|
|
|
5 |
|
6 |
shoe_labels = (
|
7 |
'Army boots',
|
|
|
2 |
from fastai.vision.all import load_learner
|
3 |
from fastai.vision.all import PILImage
|
4 |
|
5 |
+
import pathlib
|
6 |
+
temp = pathlib.PosixPath
|
7 |
+
pathlib.PosixPath = pathlib.WindowsPath
|
8 |
|
9 |
shoe_labels = (
|
10 |
'Army boots',
|