Spaces:
Runtime error
Runtime error
Adding sample images
Browse files- angryExample.jpg +0 -0
- app.py +2 -1
- disgustExample.jpg +0 -0
- fearExample.jpg +0 -0
- happyExample.jpg +0 -0
- neutralExample.jpg +0 -0
- sadExample.jpg +0 -0
- surpriseExample.jpg +0 -0
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 |
-
|
|
|
|
| 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
|