Edward Ross commited on
Commit
42cfeaf
1 Parent(s): 10af1b1

Update model to v2

Browse files
Files changed (4) hide show
  1. app.py +3 -3
  2. contempt.jpg +0 -0
  3. export.pkl +2 -2
  4. surprise.jpg +0 -0
app.py CHANGED
@@ -11,14 +11,14 @@ def predict(img):
11
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
12
 
13
  title = "Emotion Classifier"
14
- description = "An emotion classifier trained on AffectNet with fastai. Identifies emotions of anger, contempt, disgust, fear, happy, neutral, surprise, and sad."
15
 
16
- examples = ["happy.jpg", "neutral.jpg", "sad.jpg", "angry.jpg", "contempt.jpg", "fear.jpg", "surprise.jpg", "disgust.jpg"]
17
 
18
  gr.Interface(
19
  fn=predict,
20
  inputs=gr.inputs.Image(shape=(224, 224)),
21
- outputs=gr.outputs.Label(num_top_classes=3),
22
  title=title,
23
  description=description,
24
  examples=examples,
 
11
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
12
 
13
  title = "Emotion Classifier"
14
+ description = "An emotion classifier trained on AffectNet with fastai. Identifies emotions of anger, disgust, fear, happy, neutral, and sad."
15
 
16
+ examples = ["happy.jpg", "neutral.jpg", "sad.jpg", "angry.jpg", "fear.jpg", "disgust.jpg"]
17
 
18
  gr.Interface(
19
  fn=predict,
20
  inputs=gr.inputs.Image(shape=(224, 224)),
21
+ outputs=gr.outputs.Label(),
22
  title=title,
23
  description=description,
24
  examples=examples,
contempt.jpg DELETED
Binary file (35.1 kB)
 
export.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1fc5eb70037524e6ec9d011ba612e208a9ac95ed9a9feec0a9d0d84ffac3e3e5
3
- size 242786647
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2657c44c57ddd966f12825333059e05a94116ff9edbb7c5b6e95cba8f5f3074c
3
+ size 242595533
surprise.jpg DELETED
Binary file (16.3 kB)