From ab95e89a2804e6fb58256122b0250009223dd4ea Mon Sep 17 00:00:00 2001 From: emilylambert2 Date: Tue, 23 Jul 2024 13:35:00 +0100 Subject: [PATCH] restructure of dashboard to show stories --- notebooks/evaluation/app.py | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/notebooks/evaluation/app.py b/notebooks/evaluation/app.py index 44f36c415..6dc0136b3 100644 --- a/notebooks/evaluation/app.py +++ b/notebooks/evaluation/app.py @@ -5,34 +5,31 @@ st.set_option('deprecation.showPyplotGlobalUse', False) st.title('Redbox Chat History Dashboard') -user_freq_tab, traffic_tab, word_freq_tab, ai_word_freq_tab, route_tab, transitions_tab, topic_tab = st.tabs(['User frequency', - 'Redbox traffic', - 'Word frequency', - 'AI word frequency', - 'Route analysis', - 'Route transitions', - 'Topic modelling']) +user_usage_tab, word_freq_tab, route_tab, topic_tab = st.tabs([ + 'Redbox User Usage', + 'Word frequency', + 'Route Analysis', + 'Topic modelling', + ]) cha = ChatHistoryAnalysis() -with user_freq_tab: +with user_usage_tab: st.pyplot(cha.user_frequency_analysis()) - -with traffic_tab: st.pyplot(cha.redbox_traffic_analysis()) + st.pyplot(cha.redbox_traffic_by_user()) with word_freq_tab: + st.title('User') st.pyplot(cha.user_word_frequency_analysis()) - -with ai_word_freq_tab: + st.title('AI') st.pyplot(cha.ai_word_frequency_analysis()) with route_tab: st.pyplot(cha.route_analysis()) - -with transitions_tab: st.pyplot(cha.route_transitions()) + with topic_tab: with st.spinner('Fitting topic model...'): cha.get_topics()