Sathwikchowdary commited on
Commit
de73856
·
verified ·
1 Parent(s): bd571c2

Update pages/Life_cycle_of_ML.py

Browse files
Files changed (1) hide show
  1. pages/Life_cycle_of_ML.py +71 -48
pages/Life_cycle_of_ML.py CHANGED
@@ -1,49 +1,72 @@
 
 
 
1
  st.markdown('<div align="center">', unsafe_allow_html=True)
2
- <svg width="600" height="400">
3
- <!-- Problem Definition -->
4
- <a href="#problem-definition">
5
- <rect x="50" y="50" width="150" height="50" fill="#FFB6C1" stroke="#000" />
6
- <text x="75" y="80" fill="#000" font-size="14">Problem Definition</text>
7
- </a>
8
-
9
- <!-- Data Collection -->
10
- <a href="#data-collection">
11
- <circle cx="300" cy="75" r="40" fill="#ADD8E6" stroke="#000" />
12
- <text x="270" y="80" fill="#000" font-size="14">Data Collection</text>
13
- </a>
14
-
15
- <!-- Data Preprocessing -->
16
- <a href="#data-preprocessing">
17
- <ellipse cx="500" cy="75" rx="80" ry="40" fill="#90EE90" stroke="#000" />
18
- <text x="445" y="80" fill="#000" font-size="14">Data Preprocessing</text>
19
- </a>
20
-
21
- <!-- Arrows -->
22
- <line x1="200" y1="75" x2="260" y2="75" stroke="#000" marker-end="url(#arrow)" />
23
- <line x1="340" y1="75" x2="420" y2="75" stroke="#000" marker-end="url(#arrow)" />
24
-
25
- <!-- Model Building -->
26
- <a href="#model-building">
27
- <rect x="50" y="200" width="150" height="50" fill="#FFD700" stroke="#000" />
28
- <text x="75" y="230" fill="#000" font-size="14">Model Building</text>
29
- </a>
30
-
31
- <!-- Evaluation -->
32
- <a href="#evaluation">
33
- <circle cx="300" cy="225" r="40" fill="#FF7F50" stroke="#000" />
34
- <text x="275" y="230" fill="#000" font-size="14">Evaluation</text>
35
- </a>
36
-
37
- <!-- Deployment -->
38
- <a href="#deployment">
39
- <rect x="450" y="200" width="150" height="50" fill="#9370DB" stroke="#000" />
40
- <text x="475" y="230" fill="#000" font-size="14">Deployment</text>
41
- </a>
42
-
43
- <!-- Arrows -->
44
- <line x1="125" y1="250" x2="260" y2="225" stroke="#000" marker-end="url(#arrow)" />
45
- <line x1="340" y1="225" x2="450" y2="225" stroke="#000" marker-end="url(#arrow)" />
46
- </svg>
47
- </div>
48
- unsafe_allow_html=True)
49
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # Center alignment for the diagram
4
  st.markdown('<div align="center">', unsafe_allow_html=True)
5
+
6
+ # Start of SVG
7
+ st.markdown('<svg width="600" height="400">', unsafe_allow_html=True)
8
+
9
+ # Problem Definition
10
+ st.markdown('''
11
+ <a href="#problem-definition">
12
+ <rect x="50" y="50" width="150" height="50" fill="#FFB6C1" stroke="#000" />
13
+ <text x="75" y="80" fill="#000" font-size="14">Problem Definition</text>
14
+ </a>
15
+ ''', unsafe_allow_html=True)
16
+
17
+ # Data Collection
18
+ st.markdown('''
19
+ <a href="#data-collection">
20
+ <circle cx="300" cy="75" r="40" fill="#ADD8E6" stroke="#000" />
21
+ <text x="270" y="80" fill="#000" font-size="14">Data Collection</text>
22
+ </a>
23
+ ''', unsafe_allow_html=True)
24
+
25
+ # Data Preprocessing
26
+ st.markdown('''
27
+ <a href="#data-preprocessing">
28
+ <ellipse cx="500" cy="75" rx="80" ry="40" fill="#90EE90" stroke="#000" />
29
+ <text x="445" y="80" fill="#000" font-size="14">Data Preprocessing</text>
30
+ </a>
31
+ ''', unsafe_allow_html=True)
32
+
33
+ # Arrows
34
+ st.markdown('''
35
+ <line x1="200" y1="75" x2="260" y2="75" stroke="#000" marker-end="url(#arrow)" />
36
+ <line x1="340" y1="75" x2="420" y2="75" stroke="#000" marker-end="url(#arrow)" />
37
+ ''', unsafe_allow_html=True)
38
+
39
+ # Model Building
40
+ st.markdown('''
41
+ <a href="#model-building">
42
+ <rect x="50" y="200" width="150" height="50" fill="#FFD700" stroke="#000" />
43
+ <text x="75" y="230" fill="#000" font-size="14">Model Building</text>
44
+ </a>
45
+ ''', unsafe_allow_html=True)
46
+
47
+ # Evaluation
48
+ st.markdown('''
49
+ <a href="#evaluation">
50
+ <circle cx="300" cy="225" r="40" fill="#FF7F50" stroke="#000" />
51
+ <text x="275" y="230" fill="#000" font-size="14">Evaluation</text>
52
+ </a>
53
+ ''', unsafe_allow_html=True)
54
+
55
+ # Deployment
56
+ st.markdown('''
57
+ <a href="#deployment">
58
+ <rect x="450" y="200" width="150" height="50" fill="#9370DB" stroke="#000" />
59
+ <text x="475" y="230" fill="#000" font-size="14">Deployment</text>
60
+ </a>
61
+ ''', unsafe_allow_html=True)
62
+
63
+ # Additional Arrows
64
+ st.markdown('''
65
+ <line x1="125" y1="250" x2="260" y2="225" stroke="#000" marker-end="url(#arrow)" />
66
+ <line x1="340" y1="225" x2="450" y2="225" stroke="#000" marker-end="url(#arrow)" />
67
+ ''', unsafe_allow_html=True)
68
+
69
+ # Close SVG and div
70
+ st.markdown('</svg>', unsafe_allow_html=True)
71
+ st.markdown('</div>', unsafe_allow_html=True)
72
+