Jon Solow
Add top players page
83551c4
raw
history blame
736 Bytes
import streamlit as st
from config import DEFAULT_ICON
from shared_page import common_page_config
from load_options import load_options
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()
week = st.selectbox("Select Week", [1, 2, 3, 4])
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()