To upload files, please first save the app
import streamlit as st
import pandas as pd
import numpy as np
# Add some text
st.title('Simple Streamlit App')
st.write('Welcome! This is a basic demonstration of Streamlit.')
#st.button("Add", icon=":material/add:", type="secondary")
#st.button("Add stop", icon=":material/bed:", type="secondary")
#st.button("Add flight", icon=":material/flight:", type="secondary")
#st.button("Add flight", icon=":material/flight_takeoff:", type="secondary")
st.button("Add stop", icon=":material/bed:", type="secondary")
import streamlit as st
# Callback function to toggle the visibility of the date input
def toggle_date_input():
if st.session_state.trip_type == "One-way":
st.session_state.show_date_input = False
else:
st.session_state.show_date_input = True
# Initialize session state variables
if 'show_date_input' not in st.session_state:
st.session_state.show_date_input = False
# Radio button for trip type selection
st.radio(
"Select your trip type:",
options=["One-way", "Return", "Multicity"],
key="trip_type",
on_change=toggle_date_input
)
# Conditionally display the date input based on the radio button selection
if st.session_state.show_date_input:
st.date_input("Select your departure date:")
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?