cyberandy commited on
Commit
d6f48b8
·
verified ·
1 Parent(s): 88d3a28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -102,15 +102,16 @@ def main():
102
  # Run sentiment analysis
103
  df_sentiment = sentiment_analysis(msg)
104
 
105
- # Display negative sentence locations
106
- fig = px.scatter(df_sentiment, y='dominant_sentiment', color='dominant_sentiment', size='confidence',
107
- hover_data=['content'],
108
- color_discrete_map={"neg": "firebrick", "neu": "navajowhite", "pos": "darkgreen"},
109
- labels={'dominant_sentiment': 'Sentiment'},
110
- title='Sentiment Analysis of the Response')
111
- fig.update_layout(width=800, height=300)
112
- st.plotly_chart(fig)
113
-
 
114
 
115
  # Display the AI response in a collapsible section
116
  with st.expander("Show Sources"):
 
102
  # Run sentiment analysis
103
  df_sentiment = sentiment_analysis(msg)
104
 
105
+ # Display the sentiment in a collapsible section
106
+ with st.expander("Show Sentiment"):
107
+ # Display negative sentence locations
108
+ fig = px.scatter(df_sentiment, y='dominant_sentiment', color='dominant_sentiment', size='confidence',
109
+ hover_data=['content'],
110
+ color_discrete_map={"neg": "firebrick", "neu": "navajowhite", "pos": "darkgreen"},
111
+ labels={'dominant_sentiment': 'Sentiment'},
112
+ title='Sentiment Analysis of the Response')
113
+ fig.update_layout(width=800, height=300)
114
+ st.plotly_chart(fig)
115
 
116
  # Display the AI response in a collapsible section
117
  with st.expander("Show Sources"):