Update app.py
Browse files
app.py
CHANGED
@@ -427,9 +427,21 @@ with tab1:
|
|
427 |
)
|
428 |
|
429 |
with st.container():
|
430 |
-
tab1, tab2, tab3, tab4, tab5, tab6, tab7, tab8, tab9 = st.tabs(['
|
431 |
|
432 |
with tab1:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
if 'cpt_freq' in st.session_state and st.session_state.cpt_freq is not None:
|
434 |
|
435 |
st.dataframe(st.session_state.cpt_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width=True)
|
@@ -443,7 +455,8 @@ with tab1:
|
|
443 |
|
444 |
else:
|
445 |
st.write("CPT frequency data is not available yet.")
|
446 |
-
|
|
|
447 |
if 'top_freq' in st.session_state and st.session_state.top_freq is not None:
|
448 |
|
449 |
st.dataframe(st.session_state.top_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
@@ -456,7 +469,8 @@ with tab1:
|
|
456 |
)
|
457 |
else:
|
458 |
st.write("TOP frequency data is not available yet.")
|
459 |
-
|
|
|
460 |
if 'jng_freq' in st.session_state and st.session_state.jng_freq is not None:
|
461 |
|
462 |
st.dataframe(st.session_state.jng_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
@@ -467,7 +481,8 @@ with tab1:
|
|
467 |
mime='text/csv',
|
468 |
key='jng'
|
469 |
)
|
470 |
-
|
|
|
471 |
if 'mid_freq' in st.session_state:
|
472 |
|
473 |
st.dataframe(st.session_state.mid_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
@@ -478,7 +493,8 @@ with tab1:
|
|
478 |
mime='text/csv',
|
479 |
key='mid'
|
480 |
)
|
481 |
-
|
|
|
482 |
if 'adc_freq' in st.session_state:
|
483 |
|
484 |
st.dataframe(st.session_state.adc_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
@@ -489,7 +505,8 @@ with tab1:
|
|
489 |
mime='text/csv',
|
490 |
key='adc'
|
491 |
)
|
492 |
-
|
|
|
493 |
if 'sup_freq' in st.session_state:
|
494 |
|
495 |
st.dataframe(st.session_state.sup_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
@@ -500,7 +517,8 @@ with tab1:
|
|
500 |
mime='text/csv',
|
501 |
key='sup'
|
502 |
)
|
503 |
-
|
|
|
504 |
if 'team_freq' in st.session_state:
|
505 |
|
506 |
st.dataframe(st.session_state.team_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
@@ -511,7 +529,8 @@ with tab1:
|
|
511 |
mime='text/csv',
|
512 |
key='team'
|
513 |
)
|
514 |
-
|
|
|
515 |
if 'player_freq' in st.session_state:
|
516 |
|
517 |
st.dataframe(st.session_state.player_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
@@ -522,14 +541,4 @@ with tab1:
|
|
522 |
mime='text/csv',
|
523 |
key='overall'
|
524 |
)
|
525 |
-
|
526 |
-
if 'stack_freq' in st.session_state:
|
527 |
-
|
528 |
-
st.dataframe(st.session_state.stack_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(percentages_format, precision=2), use_container_width = True)
|
529 |
-
st.download_button(
|
530 |
-
label="Export Exposures",
|
531 |
-
data=st.session_state.stack_freq.to_csv().encode('utf-8'),
|
532 |
-
file_name='stack_freq.csv',
|
533 |
-
mime='text/csv',
|
534 |
-
key='stack'
|
535 |
-
)
|
|
|
427 |
)
|
428 |
|
429 |
with st.container():
|
430 |
+
tab1, tab2, tab3, tab4, tab5, tab6, tab7, tab8, tab9 = st.tabs(['Stack Exposures', 'Overall Exposures', 'CPT Exposures', 'TOP Exposures', 'JNG Exposures', 'MID Exposures', 'ADC Exposures', 'SUP Exposures', 'Team Exposures'])
|
431 |
|
432 |
with tab1:
|
433 |
+
if 'stack_freq' in st.session_state:
|
434 |
+
|
435 |
+
st.dataframe(st.session_state.stack_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(percentages_format, precision=2), use_container_width = True)
|
436 |
+
st.download_button(
|
437 |
+
label="Export Exposures",
|
438 |
+
data=st.session_state.stack_freq.to_csv().encode('utf-8'),
|
439 |
+
file_name='stack_freq.csv',
|
440 |
+
mime='text/csv',
|
441 |
+
key='stack'
|
442 |
+
)
|
443 |
+
|
444 |
+
with tab2:
|
445 |
if 'cpt_freq' in st.session_state and st.session_state.cpt_freq is not None:
|
446 |
|
447 |
st.dataframe(st.session_state.cpt_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width=True)
|
|
|
455 |
|
456 |
else:
|
457 |
st.write("CPT frequency data is not available yet.")
|
458 |
+
|
459 |
+
with tab3:
|
460 |
if 'top_freq' in st.session_state and st.session_state.top_freq is not None:
|
461 |
|
462 |
st.dataframe(st.session_state.top_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
|
|
469 |
)
|
470 |
else:
|
471 |
st.write("TOP frequency data is not available yet.")
|
472 |
+
|
473 |
+
with tab4:
|
474 |
if 'jng_freq' in st.session_state and st.session_state.jng_freq is not None:
|
475 |
|
476 |
st.dataframe(st.session_state.jng_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
|
|
481 |
mime='text/csv',
|
482 |
key='jng'
|
483 |
)
|
484 |
+
|
485 |
+
with tab5:
|
486 |
if 'mid_freq' in st.session_state:
|
487 |
|
488 |
st.dataframe(st.session_state.mid_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
|
|
493 |
mime='text/csv',
|
494 |
key='mid'
|
495 |
)
|
496 |
+
|
497 |
+
with tab6:
|
498 |
if 'adc_freq' in st.session_state:
|
499 |
|
500 |
st.dataframe(st.session_state.adc_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
|
|
505 |
mime='text/csv',
|
506 |
key='adc'
|
507 |
)
|
508 |
+
|
509 |
+
with tab7:
|
510 |
if 'sup_freq' in st.session_state:
|
511 |
|
512 |
st.dataframe(st.session_state.sup_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
|
|
517 |
mime='text/csv',
|
518 |
key='sup'
|
519 |
)
|
520 |
+
|
521 |
+
with tab8:
|
522 |
if 'team_freq' in st.session_state:
|
523 |
|
524 |
st.dataframe(st.session_state.team_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
|
|
529 |
mime='text/csv',
|
530 |
key='team'
|
531 |
)
|
532 |
+
|
533 |
+
with tab9:
|
534 |
if 'player_freq' in st.session_state:
|
535 |
|
536 |
st.dataframe(st.session_state.player_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
|
|
541 |
mime='text/csv',
|
542 |
key='overall'
|
543 |
)
|
544 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|