Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,74 +1,74 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
|
3 |
-
# Setting a custom CSS style
|
4 |
-
st.markdown(
|
5 |
-
"""
|
6 |
-
<style>
|
7 |
-
.css-18e3th9 {
|
8 |
-
padding-top: 20px;
|
9 |
-
padding-bottom: 20px;
|
10 |
-
padding-left: 40px;
|
11 |
-
padding-right: 40px;
|
12 |
-
}
|
13 |
-
h1 {
|
14 |
-
text-align: center;
|
15 |
-
color: #4CAF50;
|
16 |
-
}
|
17 |
-
.form-section {
|
18 |
-
padding: 20px;
|
19 |
-
background-color: #f9f9f9;
|
20 |
-
border-radius: 10px;
|
21 |
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
22 |
-
}
|
23 |
-
.submitted {
|
24 |
-
color: #4CAF50;
|
25 |
-
font-weight: bold;
|
26 |
-
text-align: center;
|
27 |
-
}
|
28 |
-
</style>
|
29 |
-
""",
|
30 |
-
unsafe_allow_html=True,
|
31 |
-
)
|
32 |
-
|
33 |
-
# Displaying the header image of a Muslim couple from the correct local path
|
34 |
-
st.image(
|
35 |
-
"
|
36 |
-
caption="Welcome to Muslim Matrimony",
|
37 |
-
use_column_width=True,
|
38 |
-
)
|
39 |
-
|
40 |
-
# Form fields
|
41 |
-
st.title("Register for Muslim Matrimony")
|
42 |
-
with st.form("matrimony_form"):
|
43 |
-
st.markdown('<div class="form-section">', unsafe_allow_html=True)
|
44 |
-
name = st.text_input("Your Name", max_chars=50)
|
45 |
-
city = st.selectbox(
|
46 |
-
"City",
|
47 |
-
["None","Hyderabad", "Chennai", "Delhi", "Bombay", "Pune", "Ajmer", "Lucknow"],
|
48 |
-
)
|
49 |
-
profession = st.selectbox(
|
50 |
-
"Profession", ["None", "Engineer", "Doctor", "Chartered Accountant", "Businessman"]
|
51 |
-
)
|
52 |
-
age = st.number_input("Age", min_value=18, max_value=100, step=1)
|
53 |
-
gender = st.radio("Gender", ["Male", "Female"])
|
54 |
-
qualification = st.text_input("Qualification (Leave blank if none)")
|
55 |
-
sect = st.radio("Sect", ["Sunni", "Shia"])
|
56 |
-
st.markdown('</div>', unsafe_allow_html=True)
|
57 |
-
|
58 |
-
submitted = st.form_submit_button("Submit")
|
59 |
-
|
60 |
-
if submitted:
|
61 |
-
# Welcome message with entered details
|
62 |
-
st.markdown(
|
63 |
-
'<div class="submitted"><h3>Welcome!</h3></div>', unsafe_allow_html=True
|
64 |
-
)
|
65 |
-
st.write(f"Hello, {name}!")
|
66 |
-
st.write(f"You are a **{gender}** of **{sect}** sect.")
|
67 |
-
st.write(f"Profession: **{profession}**")
|
68 |
-
st.write(f"Age: **{age}**")
|
69 |
-
st.write(f"City: **{city}**")
|
70 |
-
if qualification:
|
71 |
-
st.write(f"Qualification: **{qualification}**")
|
72 |
-
|
73 |
-
# Display balloons
|
74 |
-
st.balloons()
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
# Setting a custom CSS style
|
4 |
+
st.markdown(
|
5 |
+
"""
|
6 |
+
<style>
|
7 |
+
.css-18e3th9 {
|
8 |
+
padding-top: 20px;
|
9 |
+
padding-bottom: 20px;
|
10 |
+
padding-left: 40px;
|
11 |
+
padding-right: 40px;
|
12 |
+
}
|
13 |
+
h1 {
|
14 |
+
text-align: center;
|
15 |
+
color: #4CAF50;
|
16 |
+
}
|
17 |
+
.form-section {
|
18 |
+
padding: 20px;
|
19 |
+
background-color: #f9f9f9;
|
20 |
+
border-radius: 10px;
|
21 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
22 |
+
}
|
23 |
+
.submitted {
|
24 |
+
color: #4CAF50;
|
25 |
+
font-weight: bold;
|
26 |
+
text-align: center;
|
27 |
+
}
|
28 |
+
</style>
|
29 |
+
""",
|
30 |
+
unsafe_allow_html=True,
|
31 |
+
)
|
32 |
+
|
33 |
+
# Displaying the header image of a Muslim couple from the correct local path
|
34 |
+
st.image(
|
35 |
+
"shadi.jpg", # Path to your local image
|
36 |
+
caption="Welcome to Muslim Matrimony",
|
37 |
+
use_column_width=True,
|
38 |
+
)
|
39 |
+
|
40 |
+
# Form fields
|
41 |
+
st.title("Register for Muslim Matrimony")
|
42 |
+
with st.form("matrimony_form"):
|
43 |
+
st.markdown('<div class="form-section">', unsafe_allow_html=True)
|
44 |
+
name = st.text_input("Your Name", max_chars=50)
|
45 |
+
city = st.selectbox(
|
46 |
+
"City",
|
47 |
+
["None","Hyderabad", "Chennai", "Delhi", "Bombay", "Pune", "Ajmer", "Lucknow"],
|
48 |
+
)
|
49 |
+
profession = st.selectbox(
|
50 |
+
"Profession", ["None", "Engineer", "Doctor", "Chartered Accountant", "Businessman"]
|
51 |
+
)
|
52 |
+
age = st.number_input("Age", min_value=18, max_value=100, step=1)
|
53 |
+
gender = st.radio("Gender", ["Male", "Female"])
|
54 |
+
qualification = st.text_input("Qualification (Leave blank if none)")
|
55 |
+
sect = st.radio("Sect", ["Sunni", "Shia"])
|
56 |
+
st.markdown('</div>', unsafe_allow_html=True)
|
57 |
+
|
58 |
+
submitted = st.form_submit_button("Submit")
|
59 |
+
|
60 |
+
if submitted:
|
61 |
+
# Welcome message with entered details
|
62 |
+
st.markdown(
|
63 |
+
'<div class="submitted"><h3>Welcome!</h3></div>', unsafe_allow_html=True
|
64 |
+
)
|
65 |
+
st.write(f"Hello, {name}!")
|
66 |
+
st.write(f"You are a **{gender}** of **{sect}** sect.")
|
67 |
+
st.write(f"Profession: **{profession}**")
|
68 |
+
st.write(f"Age: **{age}**")
|
69 |
+
st.write(f"City: **{city}**")
|
70 |
+
if qualification:
|
71 |
+
st.write(f"Qualification: **{qualification}**")
|
72 |
+
|
73 |
+
# Display balloons
|
74 |
+
st.balloons()
|