Spaces:
Sleeping
Sleeping
Commit
·
a84d362
1
Parent(s):
99454ac
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"
|
| 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")
|
| 6 |
result = emotion_analyzer(sentence)
|
| 7 |
emotion = result[0]['label']
|
| 8 |
return emotion
|