jaisun2004 commited on
Commit
a1a69c6
Β·
verified Β·
1 Parent(s): 7c0f0ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -85,26 +85,26 @@ if uploaded_file:
85
  final_output = f"{summary[0]['summary_text']}\n\nContextual Observations:\n" + "\n".join(insights)
86
  st.write(final_output)
87
 
88
- with tab3:
89
- st.subheader("πŸ’¬ Emotional Insights (Overall)")
90
- if 'emotion_scores' in locals():
91
- for emo in emotion_scores[0]:
92
- st.write(f"{emo['label']}: {round(emo['score']*100, 2)}%")
93
- else:
94
- st.write("No emotional data to display.")
95
-
96
- with tab4:
97
- st.subheader("πŸ“ˆ Emotional Trends Over Time")
98
-
99
- session_dates = ["2024-04-01", "2024-04-08", "2024-04-15", "2024-04-22"]
100
- anxiety_scores = [70, 65, 55, 40]
101
- sadness_scores = [30, 20, 25, 15]
102
 
103
- fig = go.Figure()
104
- fig.add_trace(go.Scatter(x=session_dates, y=anxiety_scores, mode='lines+markers', name='Anxiety'))
105
- fig.add_trace(go.Scatter(x=session_dates, y=sadness_scores, mode='lines+markers', name='Sadness'))
106
- fig.update_layout(title='Emotional Trends', xaxis_title='Date', yaxis_title='Score (%)')
107
- st.plotly_chart(fig)
 
 
 
 
 
 
 
108
 
109
  # Export Button
110
  st.subheader("πŸ“₯ Export Session Report")
 
85
  final_output = f"{summary[0]['summary_text']}\n\nContextual Observations:\n" + "\n".join(insights)
86
  st.write(final_output)
87
 
88
+ with tab3:
89
+ st.subheader("πŸ’¬ Emotional Insights (Overall)")
90
+ if 'emotion_scores' in locals():
91
+ for emo in emotion_scores[0]:
92
+ st.write(f"{emo['label']}: {round(emo['score']*100, 2)}%")
93
+ else:
94
+ st.write("No emotional data to display.")
 
 
 
 
 
 
 
95
 
96
+ with tab4:
97
+ st.subheader("πŸ“ˆ Emotional Trends Over Time")
98
+
99
+ session_dates = ["2024-04-01", "2024-04-08", "2024-04-15", "2024-04-22"]
100
+ anxiety_scores = [70, 65, 55, 40]
101
+ sadness_scores = [30, 20, 25, 15]
102
+
103
+ fig = go.Figure()
104
+ fig.add_trace(go.Scatter(x=session_dates, y=anxiety_scores, mode='lines+markers', name='Anxiety'))
105
+ fig.add_trace(go.Scatter(x=session_dates, y=sadness_scores, mode='lines+markers', name='Sadness'))
106
+ fig.update_layout(title='Emotional Trends', xaxis_title='Date', yaxis_title='Score (%)')
107
+ st.plotly_chart(fig)
108
 
109
  # Export Button
110
  st.subheader("πŸ“₯ Export Session Report")