import streamlit as st

# Set the title of the app
st.title("Basic Streamlit App with Form")

# Create a form
with st.form("user_form"):
    # Display a header
    st.header("Welcome to Streamlit Form!")

    # Add a text input widget
    user_input = st.text_input("Enter your name:")

    # Add a slider widget
    age = st.slider("Select your age:", 0, 100, 25)

    # Add form buttons
    submit_button = st.form_submit_button("Submit")

# Handle form submission
if submit_button:
    if user_input:
        st.success(f"Hello, {user_input}!")
        st.info(f"You are {age} years old.")
    else:
        st.error("Please enter your name.")

# Display an image
st.image("./nadi-lok-image.png", caption="Image")