simple_chatbot / app.py
eagle0504's picture
Upload folder using huggingface_hub
d85b377 verified
import streamlit as st
# Configure the page
st.set_page_config(
page_title="My Streamlit App",
page_icon="πŸš€",
layout="wide"
)
# Sidebar for API Key input
with st.sidebar:
st.header("βš™οΈ Configuration")
api_key = st.text_input(
"Enter API Key",
type="password",
placeholder="Enter your API key here",
help="Your API key will be kept secure"
)
if api_key:
st.success("βœ“ API Key entered")
else:
st.warning("⚠️ Please enter your API Key")
st.divider()
st.markdown("### About")
st.info("This is a Streamlit application with API key authentication.")
# Main content area
st.title("πŸš€ Welcome to My Streamlit App")
st.markdown("---")
# Check if API key is provided
if api_key:
st.success("πŸŽ‰ You're authenticated! The app is ready to use.")
# Add your main app content here
st.header("Main Application")
col1, col2 = st.columns(2)
with col1:
st.subheader("πŸ“Š Section 1")
st.write("Add your content here")
user_input = st.text_input("Enter some text:")
if user_input:
st.write(f"You entered: {user_input}")
with col2:
st.subheader("πŸ“ˆ Section 2")
st.write("Add more content here")
option = st.selectbox(
"Choose an option:",
["Option 1", "Option 2", "Option 3"]
)
st.write(f"You selected: {option}")
# Example button
if st.button("Click Me!"):
st.balloons()
st.success("Button clicked!")
else:
st.warning("⚠️ Please enter your API Key in the sidebar to continue.")
st.info("πŸ‘ˆ Use the sidebar on the left to enter your API key.")
# Footer
st.markdown("---")
st.markdown("Built with Streamlit 🎈")