jaothan commited on
Commit
a3ebf49
·
verified ·
1 Parent(s): b361286

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +44 -82
app.py CHANGED
@@ -1,93 +1,55 @@
1
  import streamlit as st
2
- import pandas as pd
3
- import plotly.graph_objects as go
4
 
5
- # Sample data for the radar chart
6
- data = {
7
- 'Strategy & Innovation': 0.7,
8
- 'Customer Experience': 0.6,
9
- 'Organization & People': 0.5,
10
- 'Operations': 0.4,
11
- 'Risk & Cybersecurity': 0.3,
12
- 'Finance, Tax & Legal': 0.2,
13
- 'Data & Technology': 0.8
14
- }
15
- categories = list(data.keys())
16
- values = list(data.values())
17
-
18
- # Create a DataFrame for the sidebar
19
- df_sidebar = pd.DataFrame({
20
- 'Stage': ['Ideating', 'Experimenting', 'Optimizing', 'Transforming', 'Leading'],
21
- 'Description': [
22
- 'Researching generative AI’s capabilities and considering how it might benefit organization',
23
- 'Pilot projects or proofs-of-concept to validate the technology’s feasibility are conducted',
24
- 'A strategic plan is developed and generative AI solutions are in the process of integrating',
25
- 'Solutions are integrated into most of initiatives and currently refining to transform the organization',
26
- 'Fully integrated and scaled solutions across the organization with processes and capabilities to sustain and evolve'
27
- ]
28
- })
29
-
30
- # Streamlit app
31
- st.title("Generative AI Maturity assessment for your organization (overview)")
 
 
 
 
 
 
 
 
32
 
33
- # Sidebar
34
- st.sidebar.header("Overview")
35
- selected_stage = st.sidebar.selectbox("Select Stage", df_sidebar['Stage'])
36
 
37
- # Main content
38
- col1, col2 = st.columns([1, 2])
 
 
39
 
 
 
40
  with col1:
41
- # Donut chart for maturity stages
42
- st.subheader("Maturity Stages")
43
- maturity_data = {
44
- 'Ideating': 0.1,
45
- 'Experimenting': 0.3,
46
- 'Optimizing': 0.2,
47
- 'Transforming': 0.2,
48
- 'Leading': 0.2
49
- }
50
- labels = list(maturity_data.keys())
51
- sizes = list(maturity_data.values())
52
-
53
- fig_pie = go.Figure(data=[go.Pie(labels=labels, values=sizes, hole=.4)])
54
- fig_pie.update_layout(
55
- title='Overall, your organization’s GenAI maturity is in the Experimenting stage',
56
- annotations=[dict(text="1.9", x=0.5, y=0.5, font_size=20, showarrow=False)]
57
- )
58
- st.plotly_chart(fig_pie)
59
-
60
  with col2:
61
- # Radar chart
62
- st.subheader("Radar Chart")
63
- fig_radar = go.Figure()
64
- fig_radar.add_trace(go.Scatterpolar(
65
- r=values,
66
- theta=categories,
67
- fill='toself',
68
- name='Your Organization'
69
- ))
70
- fig_radar.update_layout(
71
- polar=dict(
72
- radialaxis=dict(
73
- visible=True,
74
- range=[0, 1]
75
- )),
76
- showlegend=False
77
- )
78
- st.plotly_chart(fig_radar)
79
 
80
- # Descriptions
81
- st.markdown('''
82
- <style>
83
- .description-box {
84
- background-color: #f0f0f0;
85
- padding: 10px;
86
- margin-top: 10px;
87
- border-radius: 5px;
88
- }
89
- </style>
90
- ''', unsafe_allow_html=True)
91
 
92
  for i, row in df_sidebar.iterrows():
93
  st.markdown(f'<div class="description-box"><strong>{row["Stage"]}</strong><br>{row["Description"]}</div>', unsafe_allow_html=True)
 
1
  import streamlit as st
 
 
2
 
3
+ # Page config
4
+ st.set_page_config(page_title="AI Maturity Model", layout="wide")
5
+
6
+ # Sidebar Navigation
7
+ sections = [
8
+ "Strategy & Execution",
9
+ "Customer Experience",
10
+ "Culture & People",
11
+ "Risk & Cybersecurity",
12
+ "Finance, Tax & Legal",
13
+ "Data & Technology"
14
+ ]
15
+ selected_section = st.sidebar.radio("Select Section", sections)
16
+
17
+ # Sample questions (Replace with actual data)
18
+ questions = [
19
+ {
20
+ "question": "Our organization has considered GenAI risks around design, data, performance, inclusivity, third-party, and compliance?",
21
+ "options": [
22
+ "We're in the exploratory phase, researching potential capabilities and benefits",
23
+ "We've evaluated a pilot program or proof-of-concept",
24
+ "We've developed a strategic plan and are integrating an enterprise AI solution",
25
+ "We've integrated solutions into most of our cross-functional initiatives"
26
+ ]
27
+ },
28
+ {
29
+ "question": "Our organization has considered integrated GenAI to proactively identify and predict potential risk areas?",
30
+ "options": [
31
+ "We're in the exploratory phase, researching capabilities",
32
+ "We've conducted pilots to validate feasibility",
33
+ "We've developed a strategy and are in the integration process",
34
+ "We've integrated solutions across our organization"
35
+ ]
36
+ }
37
+ ]
38
 
39
+ st.title(f"{selected_section}")
 
 
40
 
41
+ for idx, q in enumerate(questions):
42
+ st.subheader(f"Q{idx + 1}: {q['question']}")
43
+ st.radio("", q["options"], key=f"q{idx}")
44
+ st.markdown("---")
45
 
46
+ # Navigation Buttons
47
+ col1, col2 = st.columns([1, 1])
48
  with col1:
49
+ st.button("Previous Section")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  with col2:
51
+ st.button("Next Section")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  for i, row in df_sidebar.iterrows():
55
  st.markdown(f'<div class="description-box"><strong>{row["Stage"]}</strong><br>{row["Description"]}</div>', unsafe_allow_html=True)