prakharg24 commited on
Commit
be3edae
·
verified ·
1 Parent(s): 7b7ede3

Create developer_decisions.py

Browse files
Files changed (1) hide show
  1. my_pages/developer_decisions.py +55 -0
my_pages/developer_decisions.py ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ def render():
4
+ st.set_page_config(layout="wide")
5
+
6
+ # Define pipeline stages
7
+ stages = [
8
+ {"label": "Data Collection", "icon": "📥", "questions": [
9
+ "Where will you source the data from?",
10
+ "How will you ensure data quality?",
11
+ "Will you balance classes?"
12
+ ]},
13
+ {"label": "Preprocessing", "icon": "🛠️", "questions": [
14
+ "What features will you select?",
15
+ "Will you impute missing values or remove them?",
16
+ "How will you handle outliers?"
17
+ ]},
18
+ {"label": "Model Selection", "icon": "🤖", "questions": [
19
+ "Which algorithms will you consider?",
20
+ "Will you use pre-trained models?",
21
+ "How will you handle hyperparameters?"
22
+ ]},
23
+ {"label": "Training", "icon": "🏋️", "questions": [
24
+ "What loss function will you use?",
25
+ "How will you split train/validation?",
26
+ "Will you use early stopping?"
27
+ ]},
28
+ {"label": "Evaluation", "icon": "📊", "questions": [
29
+ "What metrics will you use?",
30
+ "Will you test on unseen data?",
31
+ "Will you consider fairness metrics?"
32
+ ]}
33
+ ]
34
+
35
+ # Initialize session state
36
+ if "active_stage" not in st.session_state:
37
+ st.session_state.active_stage = None
38
+
39
+ st.markdown("<h2 style='text-align: center;'>Developer Decisions Pipeline</h2>", unsafe_allow_html=True)
40
+
41
+ # Display pipeline horizontally
42
+ cols = st.columns(len(stages))
43
+ for idx, stage in enumerate(stages):
44
+ with cols[idx]:
45
+ if st.button(f"{stage['icon']}\n{stage['label']}", key=f"btn_{idx}"):
46
+ st.session_state.active_stage = idx
47
+
48
+ st.markdown("---")
49
+
50
+ # Display sub-questions for the active stage
51
+ if st.session_state.active_stage is not None:
52
+ stage = stages[st.session_state.active_stage]
53
+ st.markdown(f"### {stage['icon']} {stage['label']}")
54
+ for q in stage["questions"]:
55
+ st.write(f"- {q}")