ireneng commited on
Commit
67b0034
1 Parent(s): e4a0a56

added all files

Browse files
Files changed (4) hide show
  1. app.py +17 -0
  2. export.pkl +3 -0
  3. mango.jpg +0 -0
  4. requirements.txt +2 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+ from fastai.vision.all import *
4
+ import skimage
5
+
6
+ learn = load_learner('export.pkl')
7
+
8
+ labels = learn.dls.vocab
9
+
10
+ def predict(img):
11
+ img = PILImage.create(img)
12
+ pred,pred_idx,probs = learn.predict(img)
13
+ return {labels[i]: float(probs[i]) for i in range(len(labels))}
14
+
15
+ title = "Fruit Classifier"
16
+
17
+
export.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f626a614aa590946b5b2bace5942416b8f56b3c9ee24945a8ae7e91e559f4004
3
+ size 46979294
mango.jpg ADDED
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ fastai
2
+ scikit-image