rdlf commited on
Commit
d4caf59
·
verified ·
1 Parent(s): bddb9db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -4
app.py CHANGED
@@ -1,9 +1,18 @@
1
  import streamlit as st
 
2
 
3
- # Add your logo (adjust width and height as needed)
4
- #logo_path = "my_logo.png"
5
- #logo_width, logo_height = 100, 100
6
- #st.image(add_logo(logo_path, logo_width, logo_height), use_container_width=True)
 
 
 
 
 
 
 
 
7
 
8
  # Other content of your app
9
  st.title("My Streamlit App")
 
1
  import streamlit as st
2
+ from PIL import Image
3
 
4
+
5
+ def add_logo(logo_path, width, height):
6
+ logo = Image.open(logo_path)
7
+ modified_logo = logo.resize((width, height))
8
+ return modified_logo
9
+
10
+ # Example usage
11
+ my_logo = add_logo(logo_path="path/to/your/logo.png", width=50, height=60)
12
+ st.image(my_logo, caption="Your Logo", use_column_width=True)
13
+
14
+ # Rest of your Streamlit app
15
+ st.write("# Home")
16
 
17
  # Other content of your app
18
  st.title("My Streamlit App")