File size: 1,265 Bytes
13ce59a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
license: apache-2.0
language: en
base_model: google/bert_uncased_L-2_H-128_A-2
datasets:
- google-research-datasets/go_emotions
pipeline_tag: text-classification
tags:
- freya
- mood
---

# Freya's mood reader

A small text classifier that reads a sentence and says which of eleven moods it carries:
neutral, happy, excited, curious, thinking, proud, playful, shy, surprised, sad, sleepy.

It chooses the expression of Freya, an AI study companion, and runs inside her app in the browser.

- **Started from:** `google/bert_uncased_L-2_H-128_A-2` (4,387,339 parameters)
- **Trained on:** GoEmotions (Reddit comments labelled with emotions, mapped to the eleven moods) plus a few hand-written lines, 22,240 examples after balancing, for 4 epochs
- **Result:** 61.8% accuracy on 3,930 unseen test sentences (always answering "neutral" gets 40.9%)

## Limits

It learned from short English Reddit comments, so it is weaker on other kinds of text and other languages.
It was never taught anger, fear or disgust. Moods are a matter of opinion: treat its answer as a hint, not a fact.

## Try it

```python
from transformers import pipeline
read = pipeline("text-classification", model="wuosyn/freya-mood-reader")
print(read("i can't keep my eyes open any more"))
```