jaisun2004 commited on
Commit
693ec40
Β·
verified Β·
1 Parent(s): 47fcd16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -27
app.py CHANGED
@@ -34,34 +34,34 @@ if uploaded_file:
34
  st.error(f"❌ Processing failed: {e}")
35
  tab1, tab2, tab3, tab4 = st.tabs(["πŸ“ Transcript", "πŸ“‹ Summary", "πŸ’¬ Emotions", "πŸ“ˆ Trends"])
36
 
37
- with tab1:
38
- st.subheader("πŸ“ Speaker-Simulated Transcript")
39
- st.markdown(diarized_transcript, unsafe_allow_html=True)
40
-
41
- with tab2:
42
- st.subheader("πŸ“‹ Contextual Summary")
43
- st.write(summary[0]["summary_text"])
44
-
45
- with tab3:
46
- st.subheader("πŸ’¬ Emotional Insights (Overall)")
47
- if 'emotion_scores' in locals():
48
- for emo in emotion_scores[0]:
49
- st.write(f"{emo['label']}: {round(emo['score']*100, 2)}%")
50
- else:
51
- st.write("No emotional data to display.")
52
-
53
- with tab4:
54
- st.subheader("πŸ“ˆ Emotional Trends Over Time")
55
-
56
- session_dates = ["2024-04-01", "2024-04-08", "2024-04-15", "2024-04-22"]
57
- anxiety_scores = [70, 65, 55, 40]
58
- sadness_scores = [30, 20, 25, 15]
59
 
60
- fig = go.Figure()
61
- fig.add_trace(go.Scatter(x=session_dates, y=anxiety_scores, mode='lines+markers', name='Anxiety'))
62
- fig.add_trace(go.Scatter(x=session_dates, y=sadness_scores, mode='lines+markers', name='Sadness'))
63
- fig.update_layout(title='Emotional Trends', xaxis_title='Date', yaxis_title='Score (%)')
64
- st.plotly_chart(fig)
 
 
 
 
 
 
 
65
 
66
  # Export Button
67
  st.subheader("πŸ“₯ Export Session Report")
 
34
  st.error(f"❌ Processing failed: {e}")
35
  tab1, tab2, tab3, tab4 = st.tabs(["πŸ“ Transcript", "πŸ“‹ Summary", "πŸ’¬ Emotions", "πŸ“ˆ Trends"])
36
 
37
+ with tab1:
38
+ st.subheader("πŸ“ Speaker-Simulated Transcript")
39
+ st.markdown(diarized_transcript, unsafe_allow_html=True)
40
+
41
+ with tab2:
42
+ st.subheader("πŸ“‹ Contextual Summary")
43
+ st.write(summary[0]["summary_text"])
44
+
45
+ with tab3:
46
+ st.subheader("πŸ’¬ Emotional Insights (Overall)")
47
+ if 'emotion_scores' in locals():
48
+ for emo in emotion_scores[0]:
49
+ st.write(f"{emo['label']}: {round(emo['score']*100, 2)}%")
50
+ else:
51
+ st.write("No emotional data to display.")
 
 
 
 
 
 
 
52
 
53
+ with tab4:
54
+ st.subheader("πŸ“ˆ Emotional Trends Over Time")
55
+
56
+ session_dates = ["2024-04-01", "2024-04-08", "2024-04-15", "2024-04-22"]
57
+ anxiety_scores = [70, 65, 55, 40]
58
+ sadness_scores = [30, 20, 25, 15]
59
+
60
+ fig = go.Figure()
61
+ fig.add_trace(go.Scatter(x=session_dates, y=anxiety_scores, mode='lines+markers', name='Anxiety'))
62
+ fig.add_trace(go.Scatter(x=session_dates, y=sadness_scores, mode='lines+markers', name='Sadness'))
63
+ fig.update_layout(title='Emotional Trends', xaxis_title='Date', yaxis_title='Score (%)')
64
+ st.plotly_chart(fig)
65
 
66
  # Export Button
67
  st.subheader("πŸ“₯ Export Session Report")