Mpavan45 commited on
Commit
91c86cb
·
verified ·
1 Parent(s): 8b82ddd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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
- # Display an ML-related image
7
- image = Image.open(r"C:\Users\user\Downloads\A_detailed_and_professional_illustration_represent.jpg") # Replace with your image path
8
- st.image(image, caption="Machine Learning Overview", use_column_width=True)
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)