Update app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
from PIL import Image # Ensure this import is present
|
| 3 |
-
|
| 4 |
-
# Function to generate ML blog content
|
| 5 |
def generate_ml_blog():
|
| 6 |
-
#
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
| 10 |
def introduction_to_ml():
|
| 11 |
introduction_blog = '''
|
| 12 |
## Introduction to Machine Learning (ML)
|
|
|
|
| 1 |
import streamlit as st
|
|
|
|
|
|
|
|
|
|
| 2 |
def generate_ml_blog():
|
| 3 |
+
# Use a relative path or adjust the file path for your environment
|
| 4 |
+
image_path = "./A_detailed_and_professional_illustration_represent.jpg" # Place the image in the app directory
|
| 5 |
+
try:
|
| 6 |
+
image = Image.open(image_path) # Load the image
|
| 7 |
+
st.image(image, caption="Machine Learning Overview", use_column_width=True)
|
| 8 |
+
except FileNotFoundError:
|
| 9 |
+
st.error("Image not found. Please ensure the file exists in the correct directory.")
|
| 10 |
def introduction_to_ml():
|
| 11 |
introduction_blog = '''
|
| 12 |
## Introduction to Machine Learning (ML)
|