File size: 268 Bytes
8578816
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
from model.emotion import emotion

class EmotionAnalysis(object):
    def __init__(self):
        pass

    def predict(self, req: dict):
        text = req.get("text")
        result = emotion.predict(text)

        return result

emotion_analysis = EmotionAnalysis()