labonny commited on
Commit
8a7c33c
·
1 Parent(s): 18c282a

Adding sample images

Browse files
angryExample.jpg ADDED
app.py CHANGED
@@ -7,6 +7,7 @@ def predict(img):
7
  pred,pred_idx,probs = learn.predict(img)
8
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
9
 
10
- iface = gr.Interface(fn=predict, inputs=gr.inputs.Image(shape=(48,48)), outputs=gr.outputs.Label(num_top_classes=3))
 
11
  iface.launch()
12
 
 
7
  pred,pred_idx,probs = learn.predict(img)
8
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
9
 
10
+ examples = ["angryExample.jpg", "disgustExample.jpg", "fearExample.jpg", "happyExample.jpg", "neutralExample.jpg", "sadExample.jpg", "surpriseExample.jpg"]
11
+ iface = gr.Interface(fn=predict, inputs=gr.inputs.Image(shape=(48,48)), outputs=gr.outputs.Label(num_top_classes=3), examples=examples)
12
  iface.launch()
13
 
disgustExample.jpg ADDED
fearExample.jpg ADDED
happyExample.jpg ADDED
neutralExample.jpg ADDED
sadExample.jpg ADDED
surpriseExample.jpg ADDED