NasrinRipa commited on
Commit
3055888
β€’
1 Parent(s): 2a425b7

nut_recognizer final version v14

Browse files
Pistachio.jpg DELETED
Binary file (86.6 kB)
 
almonds.jpg ADDED
app.py CHANGED
@@ -6,24 +6,24 @@ from pathlib import Path
6
  #temp = pathlib.PosixPath
7
  #pathlib.PosixPath = pathlib.WindowsPath
8
 
9
- nut_labels = (
10
- "raw Almonds",
11
- "raw Walnuts",
12
- "raw Cashew nut",
13
- "raw Pecans",
14
- "raw Peanut",
15
- "raw Pili nut",
16
- "raw Pistachios nut",
17
- "raw Hazelnuts",
18
- "raw Brazil nut",
19
- "raw Maccademia nut",
20
- "raw Pine nut",
21
- "raw Chestnut",
22
- "raw Hickory nut",
23
- "raw Ginkgo nut"
24
- )
25
 
26
- model = load_learner('nut-recognizer-v11 .pkl')
27
 
28
 
29
  def recognize_image(image):
@@ -33,10 +33,14 @@ def recognize_image(image):
33
  image = gr.inputs.Image(shape=(192,192))
34
  label = gr.outputs.Label(num_top_classes=5)
35
  examples = [
36
- 'Pistachio.jpg',
37
  'cashew.jpg',
38
- 'macadamia-nut.jpg',
39
- 'peanuts.jpg'
 
 
 
 
40
  ]
41
 
42
  iface = gr.Interface(fn=recognize_image, inputs=image, outputs=label, examples=examples)
 
6
  #temp = pathlib.PosixPath
7
  #pathlib.PosixPath = pathlib.WindowsPath
8
 
9
+ nut_labels = [
10
+ 'raw Almonds',
11
+ 'raw Brazil nut',
12
+ 'raw Cashew nut',
13
+ 'raw Chestnut',
14
+ 'raw Ginkgo nut',
15
+ 'raw Hazelnuts',
16
+ 'raw Hickory nut',
17
+ 'raw Maccademia nut',
18
+ 'raw Peanut',
19
+ 'raw Pecans',
20
+ 'raw Pili nut',
21
+ 'raw Pine nut',
22
+ 'raw Pistachios nut',
23
+ 'raw Walnuts'
24
+ ]
25
 
26
+ model = load_learner('nut-recognizer-v14 .pkl')
27
 
28
 
29
  def recognize_image(image):
 
33
  image = gr.inputs.Image(shape=(192,192))
34
  label = gr.outputs.Label(num_top_classes=5)
35
  examples = [
36
+ 'pistachios.jpeg',
37
  'cashew.jpg',
38
+ 'macadamia.jpg',
39
+ 'peanuts.jpg',
40
+ 'walnuts',
41
+ 'chestnuts',
42
+ 'pili nuts.jpg',
43
+ 'ginkgo nuts'
44
  ]
45
 
46
  iface = gr.Interface(fn=recognize_image, inputs=image, outputs=label, examples=examples)
chestnuts.jpg ADDED
ginkgo nuts.jpg ADDED
macadamia-nut.jpg DELETED
Binary file (122 kB)
 
macadamia.jpg ADDED
nut-recognizer-v11 .pkl β†’ nut-recognizer-v14.pkl RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cebfae2df0cfd154989e43f73dc5ae55e4b328c05a5d6f1a7e0c203a277895d6
3
- size 87540560
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b758dec0e5d246dad099b08368874336308b4d19e6023c11746c590e0d0baa03
3
+ size 87540304
nut-recognizer-v4 .pkl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:5b7faff519d6c3d08d4d59c5a8fc0acac1655a61f656b78e40cb8e6779a40b61
3
- size 87521093
 
 
 
 
peanuts.jpg CHANGED
pili nuts.jpg ADDED
pistachios.jpeg ADDED
walnuts.jpg ADDED