Spaces:
Runtime error
Runtime error
Added tokenizers package
Browse files- app.py +1 -2
- requirements.txt +1 -0
app.py
CHANGED
@@ -3,7 +3,7 @@ import transformers as t
|
|
3 |
import plotly.express as px
|
4 |
import pandas as pd
|
5 |
|
6 |
-
st.title("Phrase
|
7 |
with st.spinner(text="Loading model..."):
|
8 |
classifier = t.pipeline("zero-shot-classification",
|
9 |
model="facebook/bart-large-mnli",
|
@@ -18,7 +18,6 @@ candidate_labels = ['anger', 'sadness', 'fear', 'joy', 'interest',
|
|
18 |
'surprise', 'disgust', 'shame', 'compassion', 'other']
|
19 |
|
20 |
if x != "":
|
21 |
-
|
22 |
with st.spinner(text="Evaluating your input..."):
|
23 |
output = classifier(x, candidate_labels)
|
24 |
sentiment = sentiment_task(x)
|
|
|
3 |
import plotly.express as px
|
4 |
import pandas as pd
|
5 |
|
6 |
+
st.title("Phrase Emotion Analysis")
|
7 |
with st.spinner(text="Loading model..."):
|
8 |
classifier = t.pipeline("zero-shot-classification",
|
9 |
model="facebook/bart-large-mnli",
|
|
|
18 |
'surprise', 'disgust', 'shame', 'compassion', 'other']
|
19 |
|
20 |
if x != "":
|
|
|
21 |
with st.spinner(text="Evaluating your input..."):
|
22 |
output = classifier(x, candidate_labels)
|
23 |
sentiment = sentiment_task(x)
|
requirements.txt
CHANGED
@@ -4,3 +4,4 @@ pandas
|
|
4 |
plotly
|
5 |
tensorflow
|
6 |
torch
|
|
|
|
4 |
plotly
|
5 |
tensorflow
|
6 |
torch
|
7 |
+
tokenizers
|