Multichem commited on
Commit
059a055
·
verified ·
1 Parent(s): 997cb07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -44,7 +44,7 @@ gcservice_account, uri = init_conn()
44
 
45
  percentages_format = {'PG': '{:.2%}', 'SG': '{:.2%}', 'SF': '{:.2%}', 'PF': '{:.2%}', 'C': '{:.2%}'}
46
 
47
- @st.cache_resource(ttl = 600)
48
  def init_baselines():
49
 
50
  # Create a new client and connect to the server
@@ -765,6 +765,7 @@ with tab3:
765
  buf = BytesIO()
766
  fig.savefig(buf, format="png")
767
  st.image(buf)
 
768
  elif plot_count == "Two":
769
  graph_data = working_data.reindex(['Date', plot_var1, plot_var2],axis="columns")
770
  fig, ax1 = plt.subplots(figsize=(20, 10), layout='tight')
@@ -787,6 +788,7 @@ with tab3:
787
  buf = BytesIO()
788
  fig.savefig(buf, format="png")
789
  st.image(buf)
 
790
  elif plot_count == "Three":
791
  graph_data = working_data.reindex(['Date', plot_var1, plot_var2, plot_var3],axis="columns")
792
  fig, ax1 = plt.subplots(figsize=(20, 10), layout='tight')
@@ -810,4 +812,5 @@ with tab3:
810
 
811
  buf = BytesIO()
812
  fig.savefig(buf, format="png")
813
- st.image(buf)
 
 
44
 
45
  percentages_format = {'PG': '{:.2%}', 'SG': '{:.2%}', 'SF': '{:.2%}', 'PF': '{:.2%}', 'C': '{:.2%}'}
46
 
47
+ @st.cache_resource(ttl = 599)
48
  def init_baselines():
49
 
50
  # Create a new client and connect to the server
 
765
  buf = BytesIO()
766
  fig.savefig(buf, format="png")
767
  st.image(buf)
768
+ st.table(graph_data.mean())
769
  elif plot_count == "Two":
770
  graph_data = working_data.reindex(['Date', plot_var1, plot_var2],axis="columns")
771
  fig, ax1 = plt.subplots(figsize=(20, 10), layout='tight')
 
788
  buf = BytesIO()
789
  fig.savefig(buf, format="png")
790
  st.image(buf)
791
+ st.table(graph_data.mean())
792
  elif plot_count == "Three":
793
  graph_data = working_data.reindex(['Date', plot_var1, plot_var2, plot_var3],axis="columns")
794
  fig, ax1 = plt.subplots(figsize=(20, 10), layout='tight')
 
812
 
813
  buf = BytesIO()
814
  fig.savefig(buf, format="png")
815
+ st.image(buf)
816
+ st.table(graph_data.mean())