"""Streamlit App 2: Text Repeater - Simple text manipulation tool.""" import streamlit as st st.set_page_config(page_title="App 2: Text Repeater", layout="wide") st.title("🤖 Text Repeater") st.write("Enter text and see it repeated and transformed.") # Text input user_text = st.text_input( "Your text here:", value="Hello from Streamline Gateway!", max_chars=200, ) # Repeat count repeat_count = st.slider("Repeat count:", min_value=1, max_value=10, value=3) if user_text: st.markdown("---") # Display options col1, col2 = st.columns(2) with col1: st.subheader("Original") st.markdown(f"**{user_text}**") st.subheader("Uppercase") st.code(user_text.upper()) with col2: st.subheader("Repeated") repeated_text = " ".join([user_text] * repeat_count) st.markdown(f"*{repeated_text}*") st.subheader("Character Count") st.metric("Characters", len(user_text)) st.metric("Words", len(user_text.split()))