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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +70 -8
app.py CHANGED
@@ -3,14 +3,76 @@ import pandas as pd
3
  import plotly.graph_objects as go
4
 
5
  # Sample data for the radar chart
6
- categories = ['Strategy & Innovation', 'Customer Experience', 'Organization & People',
7
- 'Operations', 'Risk & Cybersecurity', 'Finance, Tax & Legal', 'Data & Technology']
8
- values = [0.8, 0.6, 0.7, 0.5, 0.4, 0.3, 0.9]
 
 
 
 
 
 
9
 
10
- # Create a DataFrame for the radar chart
11
- df = pd.DataFrame(dict(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  r=values,
13
- theta=categories))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
- # Create the radar chart
16
- fig = go
 
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
 
16
+ categories = list(data.keys())
17
+ values = list(data.values())
18
+
19
+ # Create a DataFrame for the sidebar
20
+ df_sidebar = pd.DataFrame({
21
+ 'Stage': ['Ideating', 'Experimenting', 'Optimizing', 'Transforming', 'Leading'],
22
+ 'Description': [
23
+ 'Researching generative AI’s capabilities and considering how it might benefit organization',
24
+ 'Pilot projects or proofs-of-concept to validate the technology’s feasibility are conducted',
25
+ 'A strategic plan is developed and generative AI solutions are in the process of integrating',
26
+ 'Solutions are integrated into most of initiatives and currently refining to transform the organization',
27
+ 'Fully integrated and scaled solutions across the organization with processes and capabilities to sustain and evolve'
28
+ ]
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)