nedcpr commited on
Commit
f9d1a2f
1 Parent(s): ff8a00c

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -21
app.py DELETED
@@ -1,21 +0,0 @@
1
- import gradio as gr
2
- from fastai.vision.all import *
3
- import skimage
4
-
5
- learn = load_learner('model.pkl')
6
-
7
- categories = ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
8
-
9
- def classify_image(img):
10
- pred,idx,probs = learn.predict(img)
11
- return dict(zip(categories, map(float,probs)))
12
-
13
- image = gr.inputs.Image(shape=(100,100))
14
- label = gr.outputs.Label()
15
- title = "Sign Language Digit Classifier"
16
- description = "A sign language digit classifier trained on a Kaggle dataset with fastai. Created as a demo for fast.ai Part 1 v5 (2022)."
17
- examples = ['7.jpg','8.jpg','OK.jpg']
18
- interpretation='default'
19
- enable_queue=True
20
-
21
- gr.Interface(fn=classify_image,inputs=gr.inputs.Image(shape=(100, 100)),outputs=gr.outputs.Label(num_top_classes=3),title=title,description=description,examples=examples).launch()