Spaces:
Sleeping
Sleeping
Commit
·
99454ac
1
Parent(s):
9944b31
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import streamlit as st
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
def detect_emotion(sentence):
|
5 |
-
emotion_analyzer = pipeline("text-classification", model="
|
6 |
result = emotion_analyzer(sentence)
|
7 |
emotion = result[0]['label']
|
8 |
return emotion
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
def detect_emotion(sentence):
|
5 |
+
emotion_analyzer = pipeline("text-classification", model="mrm8488/distill-bert-base-spanish-wwm-cased-finetuned-spa-sentiment")
|
6 |
result = emotion_analyzer(sentence)
|
7 |
emotion = result[0]['label']
|
8 |
return emotion
|