bhavyagiri commited on
Commit
080a74c
1 Parent(s): 680cb6d
Files changed (3) hide show
  1. app.py +20 -0
  2. asl-baseline.pkl +3 -0
  3. requirements.txt +2 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from fastai.vision.all import *
3
+ import skimage
4
+ learn = load_learner("asl-baseline.pkl")
5
+
6
+ labels = learn.dls.vocab
7
+
8
+ def classify_asl(img):
9
+ img = PILImage.create(img)
10
+ pred,idx,probs = learn.predict(img)
11
+ return {labels[i]: float(probs[i]) for i in range(len(labels))}
12
+
13
+ image = gr.inputs.Image(shape = (128,128))
14
+ label = gr.outputs.Label(num_top_classes=39)
15
+ title = "ASL Classifier"
16
+ interpretation='default'
17
+ enable_queue=True
18
+
19
+ iface = gr.Interface(fn=classify_asl, inputs=image, outputs=label,title=title,interpretation=interpretation,enable_queue=enable_queue)
20
+ iface.launch(inline=False)
asl-baseline.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f53a2595f61ef63cac3f7663de7542c0b50a3ca79f65852a36a1659d3da3419
3
+ size 49298043
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ fastai
2
+ scikit-image