Update app.py
Browse files
app.py
CHANGED
|
@@ -1,23 +1,17 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
from PIL import Image
|
| 3 |
import os
|
| 4 |
-
import
|
| 5 |
import random
|
| 6 |
|
| 7 |
st.set_page_config(page_title="Valentine's Day Surprise", page_icon="❤️", layout="wide")
|
| 8 |
|
| 9 |
# --- Startup Page ---
|
| 10 |
if not st.session_state.get('password_entered', False):
|
| 11 |
-
# Option 1: Using a local image file (recommended for privacy)
|
| 12 |
try:
|
| 13 |
-
image = Image.open("hvd.
|
| 14 |
-
st.image(image,
|
| 15 |
except FileNotFoundError:
|
| 16 |
st.error("Image file not found. Please place 'your_image.jpg' in the same directory as your script.")
|
| 17 |
-
# Provide a default image or message here if needed.
|
| 18 |
-
|
| 19 |
-
# Option 2: Using an image URL (if you don't mind the image being publicly accessible)
|
| 20 |
-
# st.image("YOUR_IMAGE_URL_HERE", width=200) # Replace with your image URL
|
| 21 |
|
| 22 |
st.markdown(
|
| 23 |
"""
|
|
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
import os
|
| 3 |
+
from PIL import Image
|
| 4 |
import random
|
| 5 |
|
| 6 |
st.set_page_config(page_title="Valentine's Day Surprise", page_icon="❤️", layout="wide")
|
| 7 |
|
| 8 |
# --- Startup Page ---
|
| 9 |
if not st.session_state.get('password_entered', False):
|
|
|
|
| 10 |
try:
|
| 11 |
+
image = Image.open("hvd.jpg") # Replace with your image file
|
| 12 |
+
st.image(image, use_column_width=True) # Key change: use_column_width=True
|
| 13 |
except FileNotFoundError:
|
| 14 |
st.error("Image file not found. Please place 'your_image.jpg' in the same directory as your script.")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
st.markdown(
|
| 17 |
"""
|