ludjan commited on
Commit
2b7215d
1 Parent(s): df41c04

Smol changes

Browse files
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ .ipynb_checkpoints/
2
+ flagged/
.ipynb_checkpoints/notebook-checkpoint.ipynb CHANGED
@@ -50,7 +50,7 @@
50
  "outputs": [],
51
  "source": [
52
  "#|export\n",
53
- "learn = load_learner('model.pkl')"
54
  ]
55
  },
56
  {
@@ -203,7 +203,7 @@
203
  "name": "stdout",
204
  "output_type": "stream",
205
  "text": [
206
- "images/tricycle.png is a unicycle\n"
207
  ]
208
  }
209
  ],
@@ -290,7 +290,7 @@
290
  }
291
  ],
292
  "source": [
293
- "nbdev.export.nb_export('test.ipynb', 'app')\n",
294
  "print('Export successful')"
295
  ]
296
  }
 
50
  "outputs": [],
51
  "source": [
52
  "#|export\n",
53
+ "learn = load_learner('cycle-model.pkl')"
54
  ]
55
  },
56
  {
 
203
  "name": "stdout",
204
  "output_type": "stream",
205
  "text": [
206
+ "images/tricycle.png is a tricycle\n"
207
  ]
208
  }
209
  ],
 
290
  }
291
  ],
292
  "source": [
293
+ "nbdev.export.nb_export('notebook.ipynb', '')\n",
294
  "print('Export successful')"
295
  ]
296
  }
README.md CHANGED
@@ -5,7 +5,7 @@ colorFrom: red
5
  colorTo: indigo
6
  sdk: gradio
7
  sdk_version: 4.16.0
8
- app_file: app/app.py
9
  pinned: false
10
  license: apache-2.0
11
  ---
 
5
  colorTo: indigo
6
  sdk: gradio
7
  sdk_version: 4.16.0
8
+ app_file: app.py
9
  pinned: false
10
  license: apache-2.0
11
  ---
app/app.py → app.py RENAMED
@@ -1,24 +1,24 @@
1
- # AUTOGENERATED! DO NOT EDIT! File to edit: ../notebook.ipynb.
2
 
3
  # %% auto 0
4
  __all__ = ['learn', 'categories', 'image', 'label', 'intf', 'classify_image']
5
 
6
- # %% ../notebook.ipynb 2
7
  from fastai.vision.all import *
8
  import gradio as gr
9
  import timm
10
 
11
- # %% ../notebook.ipynb 3
12
- learn = load_learner('model.pkl')
13
 
14
- # %% ../notebook.ipynb 4
15
  categories = learn.dls.vocab
16
 
17
  def classify_image(img):
18
  pred,idx,probs = learn.predict(img)
19
  return dict(zip(categories, map(float,probs)))
20
 
21
- # %% ../notebook.ipynb 6
22
  image = gr.Image()
23
  label = gr.Label()
24
 
 
1
+ # AUTOGENERATED! DO NOT EDIT! File to edit: notebook.ipynb.
2
 
3
  # %% auto 0
4
  __all__ = ['learn', 'categories', 'image', 'label', 'intf', 'classify_image']
5
 
6
+ # %% notebook.ipynb 2
7
  from fastai.vision.all import *
8
  import gradio as gr
9
  import timm
10
 
11
+ # %% notebook.ipynb 3
12
+ learn = load_learner('cycle-model.pkl')
13
 
14
+ # %% notebook.ipynb 4
15
  categories = learn.dls.vocab
16
 
17
  def classify_image(img):
18
  pred,idx,probs = learn.predict(img)
19
  return dict(zip(categories, map(float,probs)))
20
 
21
+ # %% notebook.ipynb 6
22
  image = gr.Image()
23
  label = gr.Label()
24
 
notebook.ipynb CHANGED
@@ -50,7 +50,7 @@
50
  "outputs": [],
51
  "source": [
52
  "#|export\n",
53
- "learn = load_learner('model.pkl')"
54
  ]
55
  },
56
  {
@@ -203,7 +203,7 @@
203
  "name": "stdout",
204
  "output_type": "stream",
205
  "text": [
206
- "images/tricycle.png is a unicycle\n"
207
  ]
208
  }
209
  ],
@@ -229,7 +229,7 @@
229
  "name": "stdout",
230
  "output_type": "stream",
231
  "text": [
232
- "Running on local URL: http://127.0.0.1:7861\n",
233
  "\n",
234
  "To create a public link, set `share=True` in `launch()`.\n"
235
  ]
@@ -237,7 +237,7 @@
237
  {
238
  "data": {
239
  "text/html": [
240
- "<div><iframe src=\"http://127.0.0.1:7861/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
241
  ],
242
  "text/plain": [
243
  "<IPython.core.display.HTML object>"
@@ -290,7 +290,7 @@
290
  }
291
  ],
292
  "source": [
293
- "nbdev.export.nb_export('notebook.ipynb', 'app')\n",
294
  "print('Export successful')"
295
  ]
296
  }
 
50
  "outputs": [],
51
  "source": [
52
  "#|export\n",
53
+ "learn = load_learner('cycle-model.pkl')"
54
  ]
55
  },
56
  {
 
203
  "name": "stdout",
204
  "output_type": "stream",
205
  "text": [
206
+ "images/tricycle.png is a tricycle\n"
207
  ]
208
  }
209
  ],
 
229
  "name": "stdout",
230
  "output_type": "stream",
231
  "text": [
232
+ "Running on local URL: http://127.0.0.1:7860\n",
233
  "\n",
234
  "To create a public link, set `share=True` in `launch()`.\n"
235
  ]
 
237
  {
238
  "data": {
239
  "text/html": [
240
+ "<div><iframe src=\"http://127.0.0.1:7860/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
241
  ],
242
  "text/plain": [
243
  "<IPython.core.display.HTML object>"
 
290
  }
291
  ],
292
  "source": [
293
+ "nbdev.export.nb_export('notebook.ipynb', '')\n",
294
  "print('Export successful')"
295
  ]
296
  }