-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.py
More file actions
39 lines (30 loc) · 1.01 KB
/
dashboard.py
File metadata and controls
39 lines (30 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import streamlit as st
import json
import pandas as pd
st.title("YouTube Chat Intelligence Pro Dashboard")
topics = json.load(open("data/topics.json"))
sentiment = json.load(open("data/sentiment.json"))
momentum = pd.read_json("data/momentum.json", typ="series")
highlights = pd.read_json("data/highlights.json", typ="series")
emojis = json.load(open("data/emojis.json"))
bots = json.load(open("data/bots.json"))
segments = json.load(open("data/segments.json"))
summary = open("data/summary.txt").read()
st.header("AI Chat Summary")
st.write(summary)
st.header("Messages Over Time")
st.line_chart(momentum)
st.header("Highlight Moments")
st.write(highlights)
st.header("Top Emojis")
emoji_df = pd.Series(emojis).sort_values(ascending=False).head(20)
st.bar_chart(emoji_df)
st.header("Bot Candidates")
st.write(bots)
st.header("Viewer Segmentation")
seg_df = pd.Series(segments).value_counts()
st.bar_chart(seg_df)
st.header("Chat Topics")
for t,words in topics.items():
st.subheader(t)
st.write(", ".join(words))