File size: 1,706 Bytes
1021da9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import streamlit as st
st.set_page_config(layout="wide")

for name in dir():
    if not name.startswith('_'):
        del globals()[name]

import numpy as np
import pandas as pd
import streamlit as st
import gspread
import pymongo

@st.cache_resource
def init_conn():
        uri = st.secrets['mongo_uri']
        client = pymongo.MongoClient(uri, retryWrites=True, serverSelectionTimeoutMS=500000)
        db = client["MLB_Database"]

        return db
    
# db = init_conn()

player_roo_format = {'Top_finish': '{:.2%}','Top_5_finish': '{:.2%}', 'Top_10_finish': '{:.2%}', '20+%': '{:.2%}', '2x%': '{:.2%}', '3x%': '{:.2%}',
                   '4x%': '{:.2%}'}

st.markdown("""
<style>
    /* Tab styling */
    .stTabs [data-baseweb="tab-list"] {
        gap: 8px;
        padding: 4px;
    }
    .stTabs [data-baseweb="tab"] {
        height: 50px;
        white-space: pre-wrap;
        background-color: #DAA520;
        color: white;
        border-radius: 10px;
        gap: 1px;
        padding: 10px 20px;
        font-weight: bold;
        transition: all 0.3s ease;
    }
    .stTabs [aria-selected="true"] {
        background-color: #DAA520;
        border: 3px solid #FFD700;
        color: white;
    }
    .stTabs [data-baseweb="tab"]:hover {
        background-color: #FFD700;
        cursor: pointer;
    }
</style>""", unsafe_allow_html=True)

tab1, tab2, tab3 = st.tabs(["Scoring Percentages", "Player ROO", "Optimals"])

with tab1:
    st.title("Scoring Percentages")
    st.write("This is the scoring percentages tab.")

with tab2:
    st.title("Player ROO")
    st.write("This is the player ROO tab.")

with tab3:
    st.title("Optimals")
    st.write("This is the optimals tab.")