Guilherme commited on
Commit
7161399
1 Parent(s): ee2944c

adding model try 4

Browse files
.ipynb_checkpoints/app-checkpoint.ipynb CHANGED
@@ -2,8 +2,8 @@
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
- "execution_count": null,
6
- "id": "52626aba",
7
  "metadata": {},
8
  "outputs": [],
9
  "source": [
@@ -12,19 +12,19 @@
12
  },
13
  {
14
  "cell_type": "code",
15
- "execution_count": 3,
16
  "id": "2ae6666a",
17
  "metadata": {},
18
  "outputs": [],
19
  "source": [
20
  "#|export\n",
21
- "from fastai.vision.all import *\n",
22
  "import gradio as gr"
23
  ]
24
  },
25
  {
26
  "cell_type": "code",
27
- "execution_count": 14,
28
  "id": "df31ef94",
29
  "metadata": {},
30
  "outputs": [
@@ -35,7 +35,7 @@
35
  "PILImage mode=RGB size=192x192"
36
  ]
37
  },
38
- "execution_count": 14,
39
  "metadata": {},
40
  "output_type": "execute_result"
41
  }
@@ -48,7 +48,7 @@
48
  },
49
  {
50
  "cell_type": "code",
51
- "execution_count": 15,
52
  "id": "308defd6",
53
  "metadata": {},
54
  "outputs": [],
@@ -122,7 +122,7 @@
122
  },
123
  {
124
  "cell_type": "code",
125
- "execution_count": 18,
126
  "id": "e1686666",
127
  "metadata": {},
128
  "outputs": [],
@@ -194,7 +194,7 @@
194
  },
195
  {
196
  "cell_type": "code",
197
- "execution_count": 22,
198
  "id": "ed44207f",
199
  "metadata": {},
200
  "outputs": [
@@ -202,6 +202,10 @@
202
  "name": "stderr",
203
  "output_type": "stream",
204
  "text": [
 
 
 
 
205
  "C:\\Users\\Guilherme\\anaconda3\\lib\\site-packages\\gradio\\outputs.py:196: UserWarning: Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components\n",
206
  " warnings.warn(\n",
207
  "C:\\Users\\Guilherme\\anaconda3\\lib\\site-packages\\gradio\\deprecation.py:40: UserWarning: The 'type' parameter has been deprecated. Use the Number component instead.\n",
@@ -212,18 +216,21 @@
212
  "name": "stdout",
213
  "output_type": "stream",
214
  "text": [
215
- "Running on local URL: http://127.0.0.1:7860/\n",
 
216
  "\n",
217
- "To create a public link, set `share=True` in `launch()`.\n"
218
  ]
219
  },
220
  {
221
  "data": {
222
  "text/plain": [
223
- "(<gradio.routes.App at 0x20f496ab4c0>, 'http://127.0.0.1:7860/', None)"
 
 
224
  ]
225
  },
226
- "execution_count": 22,
227
  "metadata": {},
228
  "output_type": "execute_result"
229
  },
@@ -285,40 +292,6 @@
285
  "metadata": {},
286
  "output_type": "display_data"
287
  },
288
- {
289
- "data": {
290
- "text/html": [],
291
- "text/plain": [
292
- "<IPython.core.display.HTML object>"
293
- ]
294
- },
295
- "metadata": {},
296
- "output_type": "display_data"
297
- },
298
- {
299
- "data": {
300
- "text/html": [
301
- "\n",
302
- "<style>\n",
303
- " /* Turns off some styling */\n",
304
- " progress {\n",
305
- " /* gets rid of default border in Firefox and Opera. */\n",
306
- " border: none;\n",
307
- " /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
308
- " background-size: auto;\n",
309
- " }\n",
310
- " .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
311
- " background: #F44336;\n",
312
- " }\n",
313
- "</style>\n"
314
- ],
315
- "text/plain": [
316
- "<IPython.core.display.HTML object>"
317
- ]
318
- },
319
- "metadata": {},
320
- "output_type": "display_data"
321
- },
322
  {
323
  "data": {
324
  "text/html": [],
@@ -337,7 +310,7 @@
337
  "examples = ['white.jpg', 'hammer.jpg', 'tiger.jpg']\n",
338
  "\n",
339
  "intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)\n",
340
- "intf.launch(inline=False)"
341
  ]
342
  },
343
  {
@@ -350,7 +323,7 @@
350
  },
351
  {
352
  "cell_type": "code",
353
- "execution_count": 1,
354
  "id": "7f84f1a2",
355
  "metadata": {},
356
  "outputs": [
@@ -361,7 +334,7 @@
361
  "traceback": [
362
  "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
363
  "\u001b[1;31mImportError\u001b[0m Traceback (most recent call last)",
364
- "Input \u001b[1;32mIn [1]\u001b[0m, in \u001b[0;36m<cell line: 1>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mnbdev\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mexport\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m notebook2script\n\u001b[0;32m 2\u001b[0m notebook2script()\n",
365
  "\u001b[1;31mImportError\u001b[0m: cannot import name 'notebook2script' from 'nbdev.export' (C:\\Users\\Guilherme\\anaconda3\\lib\\site-packages\\nbdev\\export.py)"
366
  ]
367
  }
 
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
+ "execution_count": 2,
6
+ "id": "78c9ac0f",
7
  "metadata": {},
8
  "outputs": [],
9
  "source": [
 
12
  },
13
  {
14
  "cell_type": "code",
15
+ "execution_count": 5,
16
  "id": "2ae6666a",
17
  "metadata": {},
18
  "outputs": [],
19
  "source": [
20
  "#|export\n",
21
+ "# from fastai.vision.all import *\n",
22
  "import gradio as gr"
23
  ]
24
  },
25
  {
26
  "cell_type": "code",
27
+ "execution_count": 6,
28
  "id": "df31ef94",
29
  "metadata": {},
30
  "outputs": [
 
35
  "PILImage mode=RGB size=192x192"
36
  ]
37
  },
38
+ "execution_count": 6,
39
  "metadata": {},
40
  "output_type": "execute_result"
41
  }
 
48
  },
49
  {
50
  "cell_type": "code",
51
+ "execution_count": 7,
52
  "id": "308defd6",
53
  "metadata": {},
54
  "outputs": [],
 
122
  },
123
  {
124
  "cell_type": "code",
125
+ "execution_count": 8,
126
  "id": "e1686666",
127
  "metadata": {},
128
  "outputs": [],
 
194
  },
195
  {
196
  "cell_type": "code",
197
+ "execution_count": 10,
198
  "id": "ed44207f",
199
  "metadata": {},
200
  "outputs": [
 
202
  "name": "stderr",
203
  "output_type": "stream",
204
  "text": [
205
+ "C:\\Users\\Guilherme\\anaconda3\\lib\\site-packages\\gradio\\inputs.py:256: UserWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components\n",
206
+ " warnings.warn(\n",
207
+ "C:\\Users\\Guilherme\\anaconda3\\lib\\site-packages\\gradio\\deprecation.py:40: UserWarning: `optional` parameter is deprecated, and it has no effect\n",
208
+ " warnings.warn(value)\n",
209
  "C:\\Users\\Guilherme\\anaconda3\\lib\\site-packages\\gradio\\outputs.py:196: UserWarning: Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components\n",
210
  " warnings.warn(\n",
211
  "C:\\Users\\Guilherme\\anaconda3\\lib\\site-packages\\gradio\\deprecation.py:40: UserWarning: The 'type' parameter has been deprecated. Use the Number component instead.\n",
 
216
  "name": "stdout",
217
  "output_type": "stream",
218
  "text": [
219
+ "Running on local URL: http://127.0.0.1:7861/\n",
220
+ "Running on public URL: https://50635.gradio.app\n",
221
  "\n",
222
+ "This share link expires in 72 hours. For free permanent hosting, check out Spaces: https://huggingface.co/spaces\n"
223
  ]
224
  },
225
  {
226
  "data": {
227
  "text/plain": [
228
+ "(<gradio.routes.App at 0x21dd3ee4bb0>,\n",
229
+ " 'http://127.0.0.1:7861/',\n",
230
+ " 'https://50635.gradio.app')"
231
  ]
232
  },
233
+ "execution_count": 10,
234
  "metadata": {},
235
  "output_type": "execute_result"
236
  },
 
292
  "metadata": {},
293
  "output_type": "display_data"
294
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
  {
296
  "data": {
297
  "text/html": [],
 
310
  "examples = ['white.jpg', 'hammer.jpg', 'tiger.jpg']\n",
311
  "\n",
312
  "intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)\n",
313
+ "intf.launch(inline=False, share=True)"
314
  ]
315
  },
316
  {
 
323
  },
324
  {
325
  "cell_type": "code",
326
+ "execution_count": 3,
327
  "id": "7f84f1a2",
328
  "metadata": {},
329
  "outputs": [
 
334
  "traceback": [
335
  "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
336
  "\u001b[1;31mImportError\u001b[0m Traceback (most recent call last)",
337
+ "Input \u001b[1;32mIn [3]\u001b[0m, in \u001b[0;36m<cell line: 1>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mnbdev\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mexport\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m notebook2script\n\u001b[0;32m 2\u001b[0m notebook2script()\n",
338
  "\u001b[1;31mImportError\u001b[0m: cannot import name 'notebook2script' from 'nbdev.export' (C:\\Users\\Guilherme\\anaconda3\\lib\\site-packages\\nbdev\\export.py)"
339
  ]
340
  }
app.ipynb CHANGED
@@ -3,7 +3,7 @@
3
  {
4
  "cell_type": "code",
5
  "execution_count": 2,
6
- "id": "e2f1694f",
7
  "metadata": {},
8
  "outputs": [],
9
  "source": [
@@ -18,7 +18,7 @@
18
  "outputs": [],
19
  "source": [
20
  "#|export\n",
21
- "from fastai.vision.all import *\n",
22
  "import gradio as gr"
23
  ]
24
  },
 
3
  {
4
  "cell_type": "code",
5
  "execution_count": 2,
6
+ "id": "78c9ac0f",
7
  "metadata": {},
8
  "outputs": [],
9
  "source": [
 
18
  "outputs": [],
19
  "source": [
20
  "#|export\n",
21
+ "# from fastai.vision.all import *\n",
22
  "import gradio as gr"
23
  ]
24
  },
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ fastai
2
+ gradio