Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -97,7 +97,7 @@ if st.button("Scrape and Sentiment Analysis"):
|
|
97 |
|
98 |
with st.spinner("Doing Sentiment Analysis..."):
|
99 |
# title is short, so dont havwe to use batch processing
|
100 |
-
df['title_sentiment'] = df['Title'].apply(lambda x:
|
101 |
|
102 |
# palarell procsssing for each row of detail
|
103 |
with ThreadPoolExecutor() as executor:
|
|
|
97 |
|
98 |
with st.spinner("Doing Sentiment Analysis..."):
|
99 |
# title is short, so dont havwe to use batch processing
|
100 |
+
df['title_sentiment'] = df['Title'].apply(lambda x: safe_sentiment(sentiment_pipeline, texts=preprocess_text(x)) if x else None)
|
101 |
|
102 |
# palarell procsssing for each row of detail
|
103 |
with ThreadPoolExecutor() as executor:
|