import streamlit as st # Set page title st.title("Simple Text Input App") # Create a form for better organization with st.form("text_form"): # Text input field user_input = st.text_input("Enter your text here:") # Submit button submitted = st.form_submit_button("Submit") # Handle form submission if submitted: if user_input: st.success(f"You entered: {user_input}") # Optional: Display some additional information st.write(f"**Text length:** {len(user_input)} characters") st.write(f"**Word count:** {len(user_input.split())} words") else: st.warning("Please enter some text before submitting!") # Optional: Show instructions st.markdown("---") st.markdown("**Instructions:** Type some text in the field above and click Submit to see the results.")
To upload files, please first save the app