importing all of fast ai vision
Browse files- app.ipynb +21 -35
- app.py +1 -1
- app/app.py +1 -1
app.ipynb
CHANGED
@@ -9,14 +9,14 @@
|
|
9 |
},
|
10 |
{
|
11 |
"cell_type": "code",
|
12 |
-
"execution_count":
|
13 |
"metadata": {},
|
14 |
"outputs": [],
|
15 |
"source": [
|
16 |
"#|default_exp app\n",
|
17 |
"#|export\n",
|
18 |
"# creating a python image library from the image\n",
|
19 |
-
"from fastai.vision
|
20 |
"import gradio as gr\n",
|
21 |
"\n",
|
22 |
"def is_cat(x): return x[0].isupper()"
|
@@ -24,7 +24,7 @@
|
|
24 |
},
|
25 |
{
|
26 |
"cell_type": "code",
|
27 |
-
"execution_count":
|
28 |
"metadata": {},
|
29 |
"outputs": [
|
30 |
{
|
@@ -35,7 +35,7 @@
|
|
35 |
"PILImage mode=RGB size=144x192"
|
36 |
]
|
37 |
},
|
38 |
-
"execution_count":
|
39 |
"metadata": {},
|
40 |
"output_type": "execute_result"
|
41 |
}
|
@@ -48,7 +48,7 @@
|
|
48 |
},
|
49 |
{
|
50 |
"cell_type": "code",
|
51 |
-
"execution_count":
|
52 |
"metadata": {},
|
53 |
"outputs": [],
|
54 |
"source": [
|
@@ -63,7 +63,7 @@
|
|
63 |
},
|
64 |
{
|
65 |
"cell_type": "code",
|
66 |
-
"execution_count":
|
67 |
"metadata": {},
|
68 |
"outputs": [
|
69 |
{
|
@@ -95,14 +95,7 @@
|
|
95 |
},
|
96 |
{
|
97 |
"data": {
|
98 |
-
"text/html": [
|
99 |
-
"\n",
|
100 |
-
" <div>\n",
|
101 |
-
" <progress value='0' class='' max='1' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
|
102 |
-
" 0.00% [0/1 00:00<?]\n",
|
103 |
-
" </div>\n",
|
104 |
-
" "
|
105 |
-
],
|
106 |
"text/plain": [
|
107 |
"<IPython.core.display.HTML object>"
|
108 |
]
|
@@ -116,7 +109,7 @@
|
|
116 |
"('False', tensor(0), tensor([0.9858, 0.0142]))"
|
117 |
]
|
118 |
},
|
119 |
-
"execution_count":
|
120 |
"metadata": {},
|
121 |
"output_type": "execute_result"
|
122 |
}
|
@@ -127,7 +120,7 @@
|
|
127 |
},
|
128 |
{
|
129 |
"cell_type": "code",
|
130 |
-
"execution_count":
|
131 |
"metadata": {},
|
132 |
"outputs": [],
|
133 |
"source": [
|
@@ -141,7 +134,7 @@
|
|
141 |
},
|
142 |
{
|
143 |
"cell_type": "code",
|
144 |
-
"execution_count":
|
145 |
"metadata": {},
|
146 |
"outputs": [
|
147 |
{
|
@@ -173,14 +166,7 @@
|
|
173 |
},
|
174 |
{
|
175 |
"data": {
|
176 |
-
"text/html": [
|
177 |
-
"\n",
|
178 |
-
" <div>\n",
|
179 |
-
" <progress value='0' class='' max='1' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
|
180 |
-
" 0.00% [0/1 00:00<?]\n",
|
181 |
-
" </div>\n",
|
182 |
-
" "
|
183 |
-
],
|
184 |
"text/plain": [
|
185 |
"<IPython.core.display.HTML object>"
|
186 |
]
|
@@ -194,7 +180,7 @@
|
|
194 |
"{'Dog': 0.9858279228210449, 'Cat': 0.01417205948382616}"
|
195 |
]
|
196 |
},
|
197 |
-
"execution_count":
|
198 |
"metadata": {},
|
199 |
"output_type": "execute_result"
|
200 |
}
|
@@ -205,15 +191,15 @@
|
|
205 |
},
|
206 |
{
|
207 |
"cell_type": "code",
|
208 |
-
"execution_count":
|
209 |
"metadata": {},
|
210 |
"outputs": [
|
211 |
{
|
212 |
"name": "stdout",
|
213 |
"output_type": "stream",
|
214 |
"text": [
|
215 |
-
"Running on local URL: http://127.0.0.1:
|
216 |
-
"Running on public URL: https://
|
217 |
"\n",
|
218 |
"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"
|
219 |
]
|
@@ -222,7 +208,7 @@
|
|
222 |
"data": {
|
223 |
"text/plain": []
|
224 |
},
|
225 |
-
"execution_count":
|
226 |
"metadata": {},
|
227 |
"output_type": "execute_result"
|
228 |
}
|
@@ -240,7 +226,7 @@
|
|
240 |
},
|
241 |
{
|
242 |
"cell_type": "code",
|
243 |
-
"execution_count":
|
244 |
"metadata": {},
|
245 |
"outputs": [],
|
246 |
"source": [
|
@@ -249,7 +235,7 @@
|
|
249 |
},
|
250 |
{
|
251 |
"cell_type": "code",
|
252 |
-
"execution_count":
|
253 |
"metadata": {},
|
254 |
"outputs": [],
|
255 |
"source": [
|
@@ -258,7 +244,7 @@
|
|
258 |
},
|
259 |
{
|
260 |
"cell_type": "code",
|
261 |
-
"execution_count":
|
262 |
"metadata": {},
|
263 |
"outputs": [
|
264 |
{
|
@@ -281,7 +267,7 @@
|
|
281 |
" requires_grad=True)"
|
282 |
]
|
283 |
},
|
284 |
-
"execution_count":
|
285 |
"metadata": {},
|
286 |
"output_type": "execute_result"
|
287 |
}
|
@@ -304,7 +290,7 @@
|
|
304 |
},
|
305 |
{
|
306 |
"cell_type": "code",
|
307 |
-
"execution_count":
|
308 |
"metadata": {},
|
309 |
"outputs": [
|
310 |
{
|
|
|
9 |
},
|
10 |
{
|
11 |
"cell_type": "code",
|
12 |
+
"execution_count": 12,
|
13 |
"metadata": {},
|
14 |
"outputs": [],
|
15 |
"source": [
|
16 |
"#|default_exp app\n",
|
17 |
"#|export\n",
|
18 |
"# creating a python image library from the image\n",
|
19 |
+
"from fastai.vision import *\n",
|
20 |
"import gradio as gr\n",
|
21 |
"\n",
|
22 |
"def is_cat(x): return x[0].isupper()"
|
|
|
24 |
},
|
25 |
{
|
26 |
"cell_type": "code",
|
27 |
+
"execution_count": 13,
|
28 |
"metadata": {},
|
29 |
"outputs": [
|
30 |
{
|
|
|
35 |
"PILImage mode=RGB size=144x192"
|
36 |
]
|
37 |
},
|
38 |
+
"execution_count": 13,
|
39 |
"metadata": {},
|
40 |
"output_type": "execute_result"
|
41 |
}
|
|
|
48 |
},
|
49 |
{
|
50 |
"cell_type": "code",
|
51 |
+
"execution_count": 14,
|
52 |
"metadata": {},
|
53 |
"outputs": [],
|
54 |
"source": [
|
|
|
63 |
},
|
64 |
{
|
65 |
"cell_type": "code",
|
66 |
+
"execution_count": 15,
|
67 |
"metadata": {},
|
68 |
"outputs": [
|
69 |
{
|
|
|
95 |
},
|
96 |
{
|
97 |
"data": {
|
98 |
+
"text/html": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
"text/plain": [
|
100 |
"<IPython.core.display.HTML object>"
|
101 |
]
|
|
|
109 |
"('False', tensor(0), tensor([0.9858, 0.0142]))"
|
110 |
]
|
111 |
},
|
112 |
+
"execution_count": 15,
|
113 |
"metadata": {},
|
114 |
"output_type": "execute_result"
|
115 |
}
|
|
|
120 |
},
|
121 |
{
|
122 |
"cell_type": "code",
|
123 |
+
"execution_count": 16,
|
124 |
"metadata": {},
|
125 |
"outputs": [],
|
126 |
"source": [
|
|
|
134 |
},
|
135 |
{
|
136 |
"cell_type": "code",
|
137 |
+
"execution_count": 17,
|
138 |
"metadata": {},
|
139 |
"outputs": [
|
140 |
{
|
|
|
166 |
},
|
167 |
{
|
168 |
"data": {
|
169 |
+
"text/html": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
"text/plain": [
|
171 |
"<IPython.core.display.HTML object>"
|
172 |
]
|
|
|
180 |
"{'Dog': 0.9858279228210449, 'Cat': 0.01417205948382616}"
|
181 |
]
|
182 |
},
|
183 |
+
"execution_count": 17,
|
184 |
"metadata": {},
|
185 |
"output_type": "execute_result"
|
186 |
}
|
|
|
191 |
},
|
192 |
{
|
193 |
"cell_type": "code",
|
194 |
+
"execution_count": 18,
|
195 |
"metadata": {},
|
196 |
"outputs": [
|
197 |
{
|
198 |
"name": "stdout",
|
199 |
"output_type": "stream",
|
200 |
"text": [
|
201 |
+
"Running on local URL: http://127.0.0.1:7864\n",
|
202 |
+
"Running on public URL: https://c2ad9393bc08a7f37f.gradio.live\n",
|
203 |
"\n",
|
204 |
"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"
|
205 |
]
|
|
|
208 |
"data": {
|
209 |
"text/plain": []
|
210 |
},
|
211 |
+
"execution_count": 18,
|
212 |
"metadata": {},
|
213 |
"output_type": "execute_result"
|
214 |
}
|
|
|
226 |
},
|
227 |
{
|
228 |
"cell_type": "code",
|
229 |
+
"execution_count": 19,
|
230 |
"metadata": {},
|
231 |
"outputs": [],
|
232 |
"source": [
|
|
|
235 |
},
|
236 |
{
|
237 |
"cell_type": "code",
|
238 |
+
"execution_count": 20,
|
239 |
"metadata": {},
|
240 |
"outputs": [],
|
241 |
"source": [
|
|
|
244 |
},
|
245 |
{
|
246 |
"cell_type": "code",
|
247 |
+
"execution_count": 21,
|
248 |
"metadata": {},
|
249 |
"outputs": [
|
250 |
{
|
|
|
267 |
" requires_grad=True)"
|
268 |
]
|
269 |
},
|
270 |
+
"execution_count": 21,
|
271 |
"metadata": {},
|
272 |
"output_type": "execute_result"
|
273 |
}
|
|
|
290 |
},
|
291 |
{
|
292 |
"cell_type": "code",
|
293 |
+
"execution_count": 22,
|
294 |
"metadata": {},
|
295 |
"outputs": [
|
296 |
{
|
app.py
CHANGED
@@ -5,7 +5,7 @@ __all__ = ['temp', 'learn', 'categories', 'image', 'label', 'examples', 'intf',
|
|
5 |
|
6 |
# %% ../app.ipynb 1
|
7 |
# creating a python image library from the image
|
8 |
-
from fastai.vision
|
9 |
import gradio as gr
|
10 |
|
11 |
def is_cat(x): return x[0].isupper()
|
|
|
5 |
|
6 |
# %% ../app.ipynb 1
|
7 |
# creating a python image library from the image
|
8 |
+
from fastai.vision import *
|
9 |
import gradio as gr
|
10 |
|
11 |
def is_cat(x): return x[0].isupper()
|
app/app.py
CHANGED
@@ -5,7 +5,7 @@ __all__ = ['temp', 'learn', 'categories', 'image', 'label', 'examples', 'intf',
|
|
5 |
|
6 |
# %% ../app.ipynb 1
|
7 |
# creating a python image library from the image
|
8 |
-
from fastai.vision
|
9 |
import gradio as gr
|
10 |
|
11 |
def is_cat(x): return x[0].isupper()
|
|
|
5 |
|
6 |
# %% ../app.ipynb 1
|
7 |
# creating a python image library from the image
|
8 |
+
from fastai.vision import *
|
9 |
import gradio as gr
|
10 |
|
11 |
def is_cat(x): return x[0].isupper()
|