Spaces:
Sleeping
Sleeping
Zack
commited on
Commit
·
61ff67d
1
Parent(s):
7b2bfe6
adding another emotion model
Browse files
app.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
pipe = pipeline('sentiment-analysis')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
text = st.text_area('enter your feelings here')
|
| 6 |
|
| 7 |
if text:
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
#pipe = pipeline('sentiment-analysis')
|
| 5 |
+
pipe = pipeline(
|
| 6 |
+
task="text-classification",
|
| 7 |
+
model="SamLowe/roberta-base-go_emotions",
|
| 8 |
+
top_k=None)
|
| 9 |
+
|
| 10 |
text = st.text_area('enter your feelings here')
|
| 11 |
|
| 12 |
if text:
|