Create a streamlit application dashboard that contains 3 drop-down fields for Game title, Year and service in the same height on the page, as well another field in the next line to introduce a number value named PSU with one button aside this field.
To upload files, please first save the app
import streamlit as st
st.title("Gaming Dashboard")
# Create a container for the first row of dropdowns
col1, col2, col3 = st.columns(3)
with col1:
game_title = st.selectbox(
"Game Title",
["Select a game...", "The Legend of Zelda", "Super Mario", "Final Fantasy", "Metal Gear Solid"]
)
with col2:
year = st.selectbox(
"Year",
["Select a year..."] + [str(year) for year in range(2023, 1980, -1)]
)
with col3:
service = st.selectbox(
"Service",
["Select a service...", "Steam", "PlayStation Network", "Xbox Live", "Nintendo Online"]
)
# Create a container for the PSU input and button
col4, col5 = st.columns([3, 1])
with col4:
psu_value = st.number_input("PSU", min_value=0, max_value=1000, value=0)
with col5:
st.write("") # Add some spacing
st.write("") # Add some spacing to align button with input
submit_button = st.button("Submit")
if submit_button:
st.write("Selected values:")
st.write(f"Game Title: {game_title}")
st.write(f"Year: {year}")
st.write(f"Service: {service}")
st.write(f"PSU Value: {psu_value}")
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?