Update app.py
Browse files
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
|
| 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
|
| 255 |
st.markdown(supervised_learning())
|
| 256 |
-
elif
|
| 257 |
st.markdown(unsupervised_learning())
|
| 258 |
-
elif
|
| 259 |
st.markdown(reinforcement_learning())
|
| 260 |
-
elif
|
| 261 |
st.markdown(linear_regression())
|
| 262 |
-
elif
|
| 263 |
st.markdown(logistic_regression())
|
| 264 |
-
elif
|
| 265 |
st.markdown(decision_trees())
|
| 266 |
-
elif
|
| 267 |
st.markdown(knn())
|
| 268 |
-
elif
|
| 269 |
st.markdown(svm())
|
| 270 |
-
elif
|
| 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 |
|