You will create a store application, which has х categories of product selection
To upload files, please first save the app
import streamlit as st
import pandas as pd
def main():
st.title("Store Application")
# Sample data for products and categories
categories = ["Electronics", "Clothing", "Groceries", "Home & Living", "Sports"]
products = {
"Electronics": ["Phone", "Laptop", "Headphones"],
"Clothing": ["T-shirt", "Jeans", "Jacket"],
"Groceries": ["Milk", "Bread", "Eggs"],
"Home & Living": ["Chair", "Table", "Lamp"],
"Sports": ["Football", "Tennis Racket", "Bicycle"]
}
# Select category
selected_category = st.selectbox("Select a category", categories)
# Display products for selected category
if selected_category:
st.write(f"Products in {selected_category}:")
for product in products[selected_category]:
st.write(f"- {product}")
if __name__ == "__main__":
main()
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?