File size: 736 Bytes
31e15be
 
 
 
 
83551c4
 
31e15be
 
 
 
 
 
 
 
83551c4
 
 
 
 
 
 
31e15be
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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()