AGoretti commited on
Commit
13aa166
1 Parent(s): a4d7b30

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -17
app.py DELETED
@@ -1,17 +0,0 @@
1
- from fastbook import *
2
- from fastai.vision.widgets import *
3
- from time import sleep
4
- import gradio as gr
5
-
6
- learn_inf = load_learner(path/'export.pkl')
7
-
8
- categories = ('pink lady apple', 'red delicious apple', 'royal gala apple')
9
- def classify_image(img):
10
- pred,idx,probs = learned.predict(img)
11
- return dict(zip(categories, map(float,probs)))
12
-
13
- image = gr.inputs.Image(shape=(192,192))
14
- label = gr.outputs.Label()
15
- examples = ['maca.jpg', 'maca2.jpg', 'maca3.jpg']
16
- intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
17
- intf.launch(inline=False)