import streamlit as st from config import DEFAULT_ICON from shared_page import common_page_config from load_options import load_options from domain.playoffs import CURRENT_PLAYOFF_WEEK from format_player_html import get_all_position_week_html_str def get_page(): page_title = "Top Players" st.set_page_config(page_title=page_title, page_icon=DEFAULT_ICON, layout="wide") common_page_config() st.title(page_title) all_options = load_options() weeks = [1, 2, 3, 4] current_week_index = weeks.index(CURRENT_PLAYOFF_WEEK) week = st.selectbox("Select Week", weeks, index=current_week_index) for pos in ["QB", "RB", "WR", "TE", "K", "DEF"]: st.header(pos) week_pos_list = all_options[pos][week] st.markdown(get_all_position_week_html_str(week, week_pos_list), unsafe_allow_html=True) if __name__ == "__main__": get_page()