akar49 commited on
Commit
0c7d89c
·
verified ·
1 Parent(s): ad28335

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -5
app.py CHANGED
@@ -31,27 +31,35 @@ def predict(img):
31
  title = "Facial Emotion and Sentiment Detector"
32
 
33
  description = gr.Markdown(
34
- """Choose a face image""").value
 
 
 
 
 
 
35
 
36
  article = gr.Markdown(
37
- """
 
 
38
  Positive (Happy, Surprise)
39
 
40
  Negative (Angry, Disgust, Fear, Sad)
41
 
42
  Neutral (Neutral)
43
 
44
- **MODEL:** VGG19 """).value
45
 
46
  enable_queue=True
47
 
48
  examples = ['happy1.jpg', 'happy2.jpg', 'angry1.png', 'angry2.jpg', 'neutral1.jpg', 'neutral2.jpg']
49
 
50
  gr.Interface(fn = predict,
51
- inputs = gr.Image(shape=(48, 48), image_mode='L'),
52
  outputs = [gr.Label(label='Emotion'), gr.Label(label='Sentiment')], #gr.Label(),
53
  title = title,
54
  examples = examples,
55
  description = description,
56
  article=article,
57
- allow_flagging='never').launch(enable_queue=enable_queue)
 
31
  title = "Facial Emotion and Sentiment Detector"
32
 
33
  description = gr.Markdown(
34
+ """Ever wondered what a person might be feeling looking at their picture?
35
+ Well, now you can! Try this fun app. Just upload a facial image in JPG or
36
+ PNG format. Voila! you can now see what they might have felt when the picture
37
+ was taken.
38
+
39
+ **Tip**: Be sure to only include face to get best results. Check some sample images
40
+ below for inspiration!""").value
41
 
42
  article = gr.Markdown(
43
+ """**DISCLAIMER:** This model does not reveal the actual emotional state of a person. Use and
44
+
45
+
46
  Positive (Happy, Surprise)
47
 
48
  Negative (Angry, Disgust, Fear, Sad)
49
 
50
  Neutral (Neutral)
51
 
52
+ **MODEL:** VGG19""").value
53
 
54
  enable_queue=True
55
 
56
  examples = ['happy1.jpg', 'happy2.jpg', 'angry1.png', 'angry2.jpg', 'neutral1.jpg', 'neutral2.jpg']
57
 
58
  gr.Interface(fn = predict,
59
+ inputs = gr.Image( image_mode='L'),
60
  outputs = [gr.Label(label='Emotion'), gr.Label(label='Sentiment')], #gr.Label(),
61
  title = title,
62
  examples = examples,
63
  description = description,
64
  article=article,
65
+ allow_flagging='never').launch()