Mpavan45 commited on
Commit
f21a063
·
verified ·
1 Parent(s): 072c6cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -11
app.py CHANGED
@@ -1,5 +1,16 @@
1
  import streamlit as st
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  def introduction_to_ml():
4
  introduction_blog = '''
5
  ## Introduction to Machine Learning (ML)
@@ -234,7 +245,7 @@ st.sidebar.markdown("""
234
  """)
235
 
236
  # Display content based on the sidebar selection
237
-
238
  page = st.sidebar.radio("Select Section", [
239
  "Introduction",
240
  "Supervised Learning",
@@ -247,26 +258,26 @@ page = st.sidebar.radio("Select Section", [
247
  "Support Vector Machines (SVM)",
248
  "Neural Networks"
249
  ])
250
- if page == "Introduction":
251
  st.markdown("<h1 style='text-align: center; color: orange;'>Machine Learning (ML)</h1>", unsafe_allow_html=True)
252
  st.markdown("<h2 style='text-align: center; color: orange;'>Introduction</h2>", unsafe_allow_html=True)
253
  st.markdown(introduction_to_ml())
254
- elif page == "Supervised Learning":
255
  st.markdown(supervised_learning())
256
- elif page == "Unsupervised Learning":
257
  st.markdown(unsupervised_learning())
258
- elif page == "Reinforcement Learning":
259
  st.markdown(reinforcement_learning())
260
- elif page == "Linear Regression":
261
  st.markdown(linear_regression())
262
- elif page == "Logistic Regression":
263
  st.markdown(logistic_regression())
264
- elif page == "Decision Trees":
265
  st.markdown(decision_trees())
266
- elif page == "K-Nearest Neighbors (KNN)":
267
  st.markdown(knn())
268
- elif page == "Support Vector Machines (SVM)":
269
  st.markdown(svm())
270
- elif page == "Neural Networks":
271
  st.markdown(neural_networks())
272
 
 
1
  import streamlit as st
2
 
3
+ def generate_ml_blog():
4
+ # ML blog content with emojis
5
+ ml_content = """
6
+ ## What is Machine Learning (ML) :
7
+ 🤖 **Machine Learning (ML)** is a branch of **Artificial Intelligence (AI)** that focuses on developing systems that can learn from and make decisions or predictions based on data. 📊 Instead of being explicitly programmed to perform specific tasks, machine learning algorithms use patterns and insights derived from data to improve their performance over time. 📈
8
+
9
+ At its core, **machine learning** enables computers to act autonomously in situations where explicit instructions are impractical or impossible, making it an essential technology in today’s data-driven world. 🌍
10
+ """
11
+ retun ml_content
12
+
13
+
14
  def introduction_to_ml():
15
  introduction_blog = '''
16
  ## Introduction to Machine Learning (ML)
 
245
  """)
246
 
247
  # Display content based on the sidebar selection
248
+ st.markdown(generate_ml_blog())
249
  page = st.sidebar.radio("Select Section", [
250
  "Introduction",
251
  "Supervised Learning",
 
258
  "Support Vector Machines (SVM)",
259
  "Neural Networks"
260
  ])
261
+ if st.sidebar.radio == "Introduction":
262
  st.markdown("<h1 style='text-align: center; color: orange;'>Machine Learning (ML)</h1>", unsafe_allow_html=True)
263
  st.markdown("<h2 style='text-align: center; color: orange;'>Introduction</h2>", unsafe_allow_html=True)
264
  st.markdown(introduction_to_ml())
265
+ elif st.sidebar.radio == "Supervised Learning":
266
  st.markdown(supervised_learning())
267
+ elif st.sidebar.radio == "Unsupervised Learning":
268
  st.markdown(unsupervised_learning())
269
+ elif st.sidebar.radio == "Reinforcement Learning":
270
  st.markdown(reinforcement_learning())
271
+ elif st.sidebar.radio == "Linear Regression":
272
  st.markdown(linear_regression())
273
+ elif st.sidebar.radio == "Logistic Regression":
274
  st.markdown(logistic_regression())
275
+ elif st.sidebar.radio == "Decision Trees":
276
  st.markdown(decision_trees())
277
+ elif st.sidebar.radio == "K-Nearest Neighbors (KNN)":
278
  st.markdown(knn())
279
+ elif st.sidebar.radio == "Support Vector Machines (SVM)":
280
  st.markdown(svm())
281
+ elif st.sidebar.radio == "Neural Networks":
282
  st.markdown(neural_networks())
283