CasonMizu commited on
Commit
b34130f
1 Parent(s): a7305f7

importing all of fast ai visionall

Browse files
Files changed (3) hide show
  1. app.ipynb +27 -20
  2. app.py +1 -1
  3. app/app.py +1 -1
app.ipynb CHANGED
@@ -9,14 +9,14 @@
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,7 +24,7 @@
24
  },
25
  {
26
  "cell_type": "code",
27
- "execution_count": 13,
28
  "metadata": {},
29
  "outputs": [
30
  {
@@ -35,7 +35,7 @@
35
  "PILImage mode=RGB size=144x192"
36
  ]
37
  },
38
- "execution_count": 13,
39
  "metadata": {},
40
  "output_type": "execute_result"
41
  }
@@ -48,7 +48,7 @@
48
  },
49
  {
50
  "cell_type": "code",
51
- "execution_count": 14,
52
  "metadata": {},
53
  "outputs": [],
54
  "source": [
@@ -63,7 +63,7 @@
63
  },
64
  {
65
  "cell_type": "code",
66
- "execution_count": 15,
67
  "metadata": {},
68
  "outputs": [
69
  {
@@ -95,7 +95,14 @@
95
  },
96
  {
97
  "data": {
98
- "text/html": [],
 
 
 
 
 
 
 
99
  "text/plain": [
100
  "<IPython.core.display.HTML object>"
101
  ]
@@ -109,7 +116,7 @@
109
  "('False', tensor(0), tensor([0.9858, 0.0142]))"
110
  ]
111
  },
112
- "execution_count": 15,
113
  "metadata": {},
114
  "output_type": "execute_result"
115
  }
@@ -120,7 +127,7 @@
120
  },
121
  {
122
  "cell_type": "code",
123
- "execution_count": 16,
124
  "metadata": {},
125
  "outputs": [],
126
  "source": [
@@ -134,7 +141,7 @@
134
  },
135
  {
136
  "cell_type": "code",
137
- "execution_count": 17,
138
  "metadata": {},
139
  "outputs": [
140
  {
@@ -180,7 +187,7 @@
180
  "{'Dog': 0.9858279228210449, 'Cat': 0.01417205948382616}"
181
  ]
182
  },
183
- "execution_count": 17,
184
  "metadata": {},
185
  "output_type": "execute_result"
186
  }
@@ -191,15 +198,15 @@
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,7 +215,7 @@
208
  "data": {
209
  "text/plain": []
210
  },
211
- "execution_count": 18,
212
  "metadata": {},
213
  "output_type": "execute_result"
214
  }
@@ -226,7 +233,7 @@
226
  },
227
  {
228
  "cell_type": "code",
229
- "execution_count": 19,
230
  "metadata": {},
231
  "outputs": [],
232
  "source": [
@@ -235,7 +242,7 @@
235
  },
236
  {
237
  "cell_type": "code",
238
- "execution_count": 20,
239
  "metadata": {},
240
  "outputs": [],
241
  "source": [
@@ -244,7 +251,7 @@
244
  },
245
  {
246
  "cell_type": "code",
247
- "execution_count": 21,
248
  "metadata": {},
249
  "outputs": [
250
  {
@@ -267,7 +274,7 @@
267
  " requires_grad=True)"
268
  ]
269
  },
270
- "execution_count": 21,
271
  "metadata": {},
272
  "output_type": "execute_result"
273
  }
@@ -290,7 +297,7 @@
290
  },
291
  {
292
  "cell_type": "code",
293
- "execution_count": 22,
294
  "metadata": {},
295
  "outputs": [
296
  {
 
9
  },
10
  {
11
  "cell_type": "code",
12
+ "execution_count": 23,
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.all 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": 24,
28
  "metadata": {},
29
  "outputs": [
30
  {
 
35
  "PILImage mode=RGB size=144x192"
36
  ]
37
  },
38
+ "execution_count": 24,
39
  "metadata": {},
40
  "output_type": "execute_result"
41
  }
 
48
  },
49
  {
50
  "cell_type": "code",
51
+ "execution_count": 25,
52
  "metadata": {},
53
  "outputs": [],
54
  "source": [
 
63
  },
64
  {
65
  "cell_type": "code",
66
+ "execution_count": 26,
67
  "metadata": {},
68
  "outputs": [
69
  {
 
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&lt;?]\n",
103
+ " </div>\n",
104
+ " "
105
+ ],
106
  "text/plain": [
107
  "<IPython.core.display.HTML object>"
108
  ]
 
116
  "('False', tensor(0), tensor([0.9858, 0.0142]))"
117
  ]
118
  },
119
+ "execution_count": 26,
120
  "metadata": {},
121
  "output_type": "execute_result"
122
  }
 
127
  },
128
  {
129
  "cell_type": "code",
130
+ "execution_count": 27,
131
  "metadata": {},
132
  "outputs": [],
133
  "source": [
 
141
  },
142
  {
143
  "cell_type": "code",
144
+ "execution_count": 28,
145
  "metadata": {},
146
  "outputs": [
147
  {
 
187
  "{'Dog': 0.9858279228210449, 'Cat': 0.01417205948382616}"
188
  ]
189
  },
190
+ "execution_count": 28,
191
  "metadata": {},
192
  "output_type": "execute_result"
193
  }
 
198
  },
199
  {
200
  "cell_type": "code",
201
+ "execution_count": 29,
202
  "metadata": {},
203
  "outputs": [
204
  {
205
  "name": "stdout",
206
  "output_type": "stream",
207
  "text": [
208
+ "Running on local URL: http://127.0.0.1:7865\n",
209
+ "Running on public URL: https://700720f52cb98fbeb0.gradio.live\n",
210
  "\n",
211
  "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"
212
  ]
 
215
  "data": {
216
  "text/plain": []
217
  },
218
+ "execution_count": 29,
219
  "metadata": {},
220
  "output_type": "execute_result"
221
  }
 
233
  },
234
  {
235
  "cell_type": "code",
236
+ "execution_count": 30,
237
  "metadata": {},
238
  "outputs": [],
239
  "source": [
 
242
  },
243
  {
244
  "cell_type": "code",
245
+ "execution_count": 31,
246
  "metadata": {},
247
  "outputs": [],
248
  "source": [
 
251
  },
252
  {
253
  "cell_type": "code",
254
+ "execution_count": 32,
255
  "metadata": {},
256
  "outputs": [
257
  {
 
274
  " requires_grad=True)"
275
  ]
276
  },
277
+ "execution_count": 32,
278
  "metadata": {},
279
  "output_type": "execute_result"
280
  }
 
297
  },
298
  {
299
  "cell_type": "code",
300
+ "execution_count": 33,
301
  "metadata": {},
302
  "outputs": [
303
  {
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 import *
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.all 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 import *
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.all import *
9
  import gradio as gr
10
 
11
  def is_cat(x): return x[0].isupper()