Spaces:
Runtime error
Runtime error
darthPanda
commited on
Commit
·
82ffb8c
1
Parent(s):
e0ed1f1
hf1
Browse files
app.py
CHANGED
@@ -148,19 +148,19 @@ elif len(uploaded_file)>0:
|
|
148 |
|
149 |
del sentences
|
150 |
|
151 |
-
with st.spinner('
|
152 |
-
|
153 |
tokenizer = tokenizer_sentiment
|
154 |
model = model_sentiment
|
155 |
pipe = pipeline(model="ProsusAI/finbert")
|
156 |
classifier = pipeline(model="ProsusAI/finbert")
|
157 |
output = classifier(useful_sentence)
|
158 |
|
|
|
159 |
tokenizer = tokenizer_emotion
|
160 |
model = model_emotion
|
161 |
classifier = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", top_k=1)
|
162 |
output_emotion = classifier(useful_sentence)
|
163 |
-
|
164 |
|
165 |
df = pd.DataFrame.from_dict(output)
|
166 |
df['Sentence']= pd.Series(useful_sentence)
|
|
|
148 |
|
149 |
del sentences
|
150 |
|
151 |
+
with st.spinner('Performing Sentiment Analysis...'):
|
|
|
152 |
tokenizer = tokenizer_sentiment
|
153 |
model = model_sentiment
|
154 |
pipe = pipeline(model="ProsusAI/finbert")
|
155 |
classifier = pipeline(model="ProsusAI/finbert")
|
156 |
output = classifier(useful_sentence)
|
157 |
|
158 |
+
with st.spinner('Performing Emotion Analysis...'):
|
159 |
tokenizer = tokenizer_emotion
|
160 |
model = model_emotion
|
161 |
classifier = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", top_k=1)
|
162 |
output_emotion = classifier(useful_sentence)
|
163 |
+
|
164 |
|
165 |
df = pd.DataFrame.from_dict(output)
|
166 |
df['Sentence']= pd.Series(useful_sentence)
|