baLLseM / routers /sentiment.py
hqms's picture
initial commit
8578816
raw
history blame contribute delete
284 Bytes
from model.sentiment import sentiment
class SentimentAnalysis(object):
def __init__(self):
pass
def predict(self, req: dict):
text = req.get("text")
result = sentiment.predict(text)
return result
sentiment_analysis = SentimentAnalysis()