nlpblogs commited on
Commit
f9bad0f
·
verified ·
1 Parent(s): deb599b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -141,7 +141,9 @@ if st.button("Sentiment Analysis", type="secondary"):
141
  except Exception as e:
142
  st.error(f"Exception during comment extraction: {e}")
143
  driver.quit()
144
- df = pd.DataFrame(data, columns=["User ID", "Comment", "comment_date"])
 
 
145
  st.dataframe(df)
146
 
147
  if tokenizer and model:
@@ -163,7 +165,7 @@ if st.button("Sentiment Analysis", type="secondary"):
163
  fig1.update_traces(textposition='inside', textinfo='percent+label')
164
  st.plotly_chart(fig1)
165
 
166
- result = pd.concat([df, sentiment_df], axis=1, na_filter=False)
167
  st.dataframe(result)
168
 
169
 
 
141
  except Exception as e:
142
  st.error(f"Exception during comment extraction: {e}")
143
  driver.quit()
144
+ df1 = pd.DataFrame(data, columns=["User ID", "Comment", "comment_date"])
145
+ st.dataframe(df1)
146
+ df = df1.dropna(subset=['Comment'], inplace=True)
147
  st.dataframe(df)
148
 
149
  if tokenizer and model:
 
165
  fig1.update_traces(textposition='inside', textinfo='percent+label')
166
  st.plotly_chart(fig1)
167
 
168
+ result = pd.concat([df, sentiment_df], axis=1)
169
  st.dataframe(result)
170
 
171