ortal12345 commited on
Commit
26b72fd
Β·
verified Β·
1 Parent(s): 897c930
Files changed (3) hide show
  1. dashboard.py +45 -0
  2. requirements.txt +2 -0
  3. results_zip.zip +3 -0
dashboard.py ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ """dashboard
3
+
4
+ Automatically generated by Colab.
5
+
6
+ Original file is located at
7
+ https://colab.research.google.com/drive/1yT5Jix3VrdcKCeSgH-Gt-NSJnfHzX42H
8
+ """
9
+
10
+ # πŸ“Š Streamlit Dashboard Code (Save as `dashboard.py`)
11
+
12
+ import streamlit as st
13
+ import pandas as pd
14
+ import os
15
+
16
+ st.title("πŸ“Š Mental Health Datasets Comparison Dashboard")
17
+
18
+ # Use absolute path if needed, fallback to local folder
19
+ results_dir = os.path.abspath("EDA_results")
20
+ dataset_dirs = [f for f in os.listdir(results_dir) if os.path.isdir(os.path.join(results_dir, f))]
21
+
22
+ for ds in dataset_dirs:
23
+ st.subheader(f"πŸ“ Dataset: {ds}")
24
+ ds_path = os.path.join(results_dir, ds)
25
+
26
+ col1, col2 = st.columns(2)
27
+
28
+ with col1:
29
+ plot1 = os.path.join(ds_path, "class_balance_plot.png")
30
+ plot2 = os.path.join(ds_path, "avg_text_length_plot.png")
31
+ if os.path.exists(plot1):
32
+ st.image(plot1, caption="Class Balance")
33
+ if os.path.exists(plot2):
34
+ st.image(plot2, caption="Avg Text Length by Label")
35
+
36
+ with col2:
37
+ wc = os.path.join(ds_path, "wordcloud.png")
38
+ if os.path.exists(wc):
39
+ st.image(wc, caption="Word Cloud")
40
+
41
+ entropy_path = os.path.join(ds_path, "entropy.csv")
42
+ if os.path.exists(entropy_path):
43
+ entropy = pd.read_csv(entropy_path)
44
+ if 'entropy' in entropy.columns:
45
+ st.metric(label="πŸ”€ Entropy (Label Diversity)", value=round(entropy['entropy'][0], 3))
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ streamlit
2
+ pandas
results_zip.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a421945bff54a26c9c5e572a70c808c47ae603c947045630789c1577e45263b
3
+ size 1614550