Keiraj commited on
Commit
15d12fd
·
verified ·
1 Parent(s): 4f82213

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -11
app.py CHANGED
@@ -1,17 +1,19 @@
1
  import streamlit as st
2
 
3
- # Function to greet the user
4
- def greet(name):
5
- return f"Hi, {name}! Welcome to the cute greeting app! 🌸"
 
6
 
7
- # Streamlit interface
8
- st.title("Cute Greeting App")
9
- st.write("Enter your name below to get a cute greeting!")
10
 
11
- # Input field for the user's name
12
- name = st.text_input("What's your name?")
 
 
 
 
13
 
14
- # Display the greeting if a name is entered
15
  if name:
16
- greeting = greet(name)
17
- st.write(greeting)
 
1
  import streamlit as st
2
 
3
+ # Load CSS
4
+ def load_css(file_name):
5
+ with open(file_name, "r") as f:
6
+ st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
7
 
8
+ # Apply CSS
9
+ load_css("style.css")
 
10
 
11
+ # Streamlit UI
12
+ st.title("🌸 Cute Greeting App 🌸")
13
+ st.write("Enter your name below for a special greeting!")
14
+
15
+ # Input field for name
16
+ name = st.text_input("Your Name:")
17
 
 
18
  if name:
19
+ st.subheader(f"✨ Hi, {name}! You're amazing! ✨")