Update app.py
Browse files
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 |
-
#
|
| 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 |
-
st.sidebar.header("Overview")
|
| 35 |
-
selected_stage = st.sidebar.selectbox("Select Stage", df_sidebar['Stage'])
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
|
|
|
|
|
|
| 39 |
|
|
|
|
|
|
|
| 40 |
with col1:
|
| 41 |
-
|
| 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 |
-
|
| 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)
|