jaothan commited on
Commit
f03fa95
·
verified ·
1 Parent(s): 7d2d236

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +53 -38
app.py CHANGED
@@ -12,7 +12,6 @@ data = {
12
  'Finance, Tax & Legal': 0.2,
13
  'Data & Technology': 0.8
14
  }
15
-
16
  categories = list(data.keys())
17
  values = list(data.values())
18
 
@@ -29,50 +28,66 @@ df_sidebar = pd.DataFrame({
29
  })
30
 
31
  # Streamlit app
32
- st.title("Generative AI Maturity Assessment for Your Organization")
33
 
34
  # Sidebar
35
  st.sidebar.header("Overview")
36
  st.sidebar.write(df_sidebar)
37
 
38
  # Main content
39
- st.subheader("Radar Chart")
40
-
41
- fig = go.Figure()
42
-
43
- fig.add_trace(go.Scatterpolar(
44
- r=values,
45
- theta=categories,
46
- fill='toself',
47
- name='Your Organization'
48
- ))
49
-
50
- fig.update_layout(
51
- polar=dict(
52
- radialaxis=dict(
53
- visible=True,
54
- range=[0, 1]
55
- )),
56
- showlegend=False
57
- )
58
 
59
- st.plotly_chart(fig)
60
-
61
- # Pie chart for maturity stages
62
- st.subheader("Maturity Stages")
63
-
64
- maturity_data = {
65
- 'Ideating': 0.1,
66
- 'Experimenting': 0.3,
67
- 'Optimizing': 0.2,
68
- 'Transforming': 0.2,
69
- 'Leading': 0.2
70
- }
 
 
 
 
 
 
 
71
 
72
- labels = list(maturity_data.keys())
73
- sizes = list(maturity_data.values())
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
- fig_pie = go.Figure(data=[go.Pie(labels=labels, values=sizes)])
76
- fig_pie.update_layout(title='Overall, your organization’s GenAI maturity is in the Experimenting stage')
 
 
 
 
 
 
 
 
 
77
 
78
- st.plotly_chart(fig_pie)
 
 
12
  'Finance, Tax & Legal': 0.2,
13
  'Data & Technology': 0.8
14
  }
 
15
  categories = list(data.keys())
16
  values = list(data.values())
17
 
 
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
  st.sidebar.write(df_sidebar)
36
 
37
  # Main content
38
+ col1, col2 = st.columns([1, 2])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
+ with col1:
41
+ # Pie 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)