Sathwikchowdary commited on
Commit
70531fd
·
verified ·
1 Parent(s): e72bace

Update pages/Life_cycle_of_ML.py

Browse files
Files changed (1) hide show
  1. pages/Life_cycle_of_ML.py +35 -23
pages/Life_cycle_of_ML.py CHANGED
@@ -1,46 +1,58 @@
1
  import streamlit as st
2
 
3
  # Center alignment for the SVG diagram
4
- st.markdown('<div style="text-align: center;">', unsafe_allow_html=True)
5
 
6
- # Simplified SVG Diagram for Machine Learning Life Cycle
7
  st.markdown('''
8
- <svg width="700" height="500">
9
 
10
  <!-- Problem Definition -->
11
- <rect x="50" y="50" width="200" height="50" fill="#FFD700" stroke="#000" />
12
- <text x="70" y="80" fill="#000" font-size="14">Problem Definition</text>
 
 
13
 
14
  <!-- Data Collection -->
15
- <rect x="50" y="150" width="200" height="50" fill="#ADD8E6" stroke="#000" />
16
- <text x="70" y="180" fill="#000" font-size="14">Data Collection</text>
 
 
17
 
18
  <!-- Data Preprocessing -->
19
- <rect x="50" y="250" width="200" height="50" fill="#90EE90" stroke="#000" />
20
- <text x="70" y="280" fill="#000" font-size="14">Data Preprocessing</text>
 
 
 
 
 
 
21
 
22
  <!-- Model Building -->
23
- <rect x="350" y="150" width="200" height="50" fill="#FFB6C1" stroke="#000" />
24
- <text x="370" y="180" fill="#000" font-size="14">Model Building</text>
 
 
25
 
26
- <!-- Model Evaluation -->
27
- <rect x="350" y="250" width="200" height="50" fill="#9370DB" stroke="#000" />
28
- <text x="370" y="280" fill="#000" font-size="14">Model Evaluation</text>
 
 
29
 
30
  <!-- Deployment -->
31
- <rect x="200" y="400" width="200" height="50" fill="#FF7F50" stroke="#000" />
32
- <text x="230" y="430" fill="#000" font-size="14">Deployment</text>
 
 
33
 
34
  <!-- Arrows -->
35
- <line x1="150" y1="100" x2="150" y2="150" stroke="#000" />
36
- <line x1="150" y1="200" x2="150" y2="250" stroke="#000" />
37
- <line x1="250" y1="175" x2="350" y2="175" stroke="#000" />
38
- <line x1="450" y1="200" x2="450" y2="250" stroke="#000" />
39
- <line x1="350" y1="275" x2="250" y2="275" stroke="#000" />
40
- <line x1="300" y1="300" x2="300" y2="400" stroke="#000" />
41
 
42
  </svg>
43
  ''', unsafe_allow_html=True)
44
 
45
- # Close the div
46
  st.markdown('</div>', unsafe_allow_html=True)
 
1
  import streamlit as st
2
 
3
  # Center alignment for the SVG diagram
4
+ st.markdown('<div align="center">', unsafe_allow_html=True)
5
 
6
+ # SVG with shapes and clickable buttons (links)
7
  st.markdown('''
8
+ <svg width="600" height="400">
9
 
10
  <!-- Problem Definition -->
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
 
16
  <!-- Data Collection -->
17
+ <a href="#data-collection">
18
+ <circle cx="300" cy="75" r="40" fill="#ADD8E6" stroke="#000" />
19
+ <text x="270" y="80" fill="#000" font-size="14">Data Collection</text>
20
+ </a>
21
 
22
  <!-- Data Preprocessing -->
23
+ <a href="#data-preprocessing">
24
+ <ellipse cx="500" cy="75" rx="80" ry="40" fill="#90EE90" stroke="#000" />
25
+ <text x="445" y="80" fill="#000" font-size="14">Data Preprocessing</text>
26
+ </a>
27
+
28
+ <!-- Arrows -->
29
+ <line x1="200" y1="75" x2="260" y2="75" stroke="#000" marker-end="url(#arrow)" />
30
+ <line x1="340" y1="75" x2="420" y2="75" stroke="#000" marker-end="url(#arrow)" />
31
 
32
  <!-- Model Building -->
33
+ <a href="#model-building">
34
+ <rect x="50" y="200" width="150" height="50" fill="#FFD700" stroke="#000" />
35
+ <text x="75" y="230" fill="#000" font-size="14">Model Building</text>
36
+ </a>
37
 
38
+ <!-- Evaluation -->
39
+ <a href="#evaluation">
40
+ <circle cx="300" cy="225" r="40" fill="#FF7F50" stroke="#000" />
41
+ <text x="275" y="230" fill="#000" font-size="14">Evaluation</text>
42
+ </a>
43
 
44
  <!-- Deployment -->
45
+ <a href="#deployment">
46
+ <rect x="450" y="200" width="150" height="50" fill="#9370DB" stroke="#000" />
47
+ <text x="475" y="230" fill="#000" font-size="14">Deployment</text>
48
+ </a>
49
 
50
  <!-- Arrows -->
51
+ <line x1="125" y1="250" x2="260" y2="225" stroke="#000" marker-end="url(#arrow)" />
52
+ <line x1="340" y1="225" x2="450" y2="225" stroke="#000" marker-end="url(#arrow)" />
 
 
 
 
53
 
54
  </svg>
55
  ''', unsafe_allow_html=True)
56
 
57
+ # Close the div for centering the SVG
58
  st.markdown('</div>', unsafe_allow_html=True)