File size: 2,201 Bytes
d293caa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import streamlit as st

# Setting a custom CSS style
st.markdown(
    """
    <style>
        .css-18e3th9 {
            padding-top: 20px;
            padding-bottom: 20px;
            padding-left: 40px;
            padding-right: 40px;
        }
        h1 {
            text-align: center;
            color: #4CAF50;
        }
        .form-section {
            padding: 20px;
            background-color: #f9f9f9;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        .submitted {
            color: #4CAF50;
            font-weight: bold;
            text-align: center;
        }
    </style>
    """,
    unsafe_allow_html=True,
)

# Displaying the header image of a Muslim couple from the correct local path
st.image(
    "shadi.jpg",  # Path to your local image
    caption="Welcome to Muslim Matrimony",
    use_column_width=True,
)

# Form fields
st.title("Register for Muslim Matrimony")
with st.form("matrimony_form"):
    st.markdown('<div class="form-section">', unsafe_allow_html=True)
    name = st.text_input("Your Name", max_chars=50)
    city = st.selectbox(
        "City",
        ["None","Hyderabad", "Chennai", "Delhi", "Bombay", "Pune", "Ajmer", "Lucknow"],
    )
    profession = st.selectbox(
        "Profession", ["None",  "Engineer", "Doctor", "Chartered Accountant", "Businessman"]
    )
    age = st.number_input("Age", min_value=18, max_value=100, step=1)
    gender = st.radio("Gender", ["Male", "Female"])
    qualification = st.text_input("Qualification (Leave blank if none)")
    sect = st.radio("Sect", ["Sunni", "Shia"])
    st.markdown('</div>', unsafe_allow_html=True)

    submitted = st.form_submit_button("Submit")

if submitted:
    # Welcome message with entered details
    st.markdown(
        '<div class="submitted"><h3>Welcome!</h3></div>', unsafe_allow_html=True
    )
    st.write(f"Hello, {name}!")
    st.write(f"You are a **{gender}** of **{sect}** sect.")
    st.write(f"Profession: **{profession}**")
    st.write(f"Age: **{age}**")
    st.write(f"City: **{city}**")
    if qualification:
        st.write(f"Qualification: **{qualification}**")

    # Display balloons
    st.balloons()