duongthienz commited on
Commit
715c67e
·
verified ·
1 Parent(s): d7532eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -12
app.py CHANGED
@@ -669,8 +669,11 @@ try:
669
  printV("Pie1 Posttrace",4)
670
 
671
  col1_1, col1_2 = st.columns(2)
672
- fig1.write_image("ascn_pie1.pdf")
673
- fig1.write_image("ascn_pie1.svg")
 
 
 
674
  printV("Pie1 files written",4)
675
  with col1_1:
676
  printV("Pie1 in col1_1",4)
@@ -718,8 +721,11 @@ try:
718
  fig2.add_trace(go.Pie(values=df4["values"],labels=df4["names"],sort=False))
719
 
720
  col2_1, col2_2 = st.columns(2)
721
- fig2.write_image("ascn_pie2.pdf")
722
- fig2.write_image("ascn_pie2.svg")
 
 
 
723
  with col2_1:
724
  with open('ascn_pie2.pdf','rb') as f:
725
  st.download_button(
@@ -772,8 +778,11 @@ try:
772
  )
773
 
774
  col3_1, col3_2 = st.columns(2)
775
- fig3_1.write_image("ascn_sunburst.pdf")
776
- fig3_1.write_image("ascn_sunburst.svg")
 
 
 
777
  with col3_1:
778
  with open('ascn_sunburst.pdf','rb') as f:
779
  st.download_button(
@@ -826,8 +835,11 @@ try:
826
  )
827
 
828
  col4_1, col4_2 = st.columns(2)
829
- fig3.write_image("ascn_treemap.pdf")
830
- fig3.write_image("ascn_treemap.svg")
 
 
 
831
  with col4_1:
832
  with open('ascn_treemap.pdf','rb') as f:
833
  st.download_button(
@@ -884,8 +896,11 @@ try:
884
  )
885
 
886
  col5_1, col5_2 = st.columns(2)
887
- fig_la.write_image("ascn_timeline.pdf")
888
- fig_la.write_image("ascn_timeline.svg")
 
 
 
889
  with col5_1:
890
  with open('ascn_timeline.pdf','rb') as f:
891
  st.download_button(
@@ -933,8 +948,11 @@ try:
933
  )
934
 
935
  col6_1, col6_2 = st.columns(2)
936
- fig_la.write_image("ascn_bar.pdf")
937
- fig_la.write_image("ascn_bar.svg")
 
 
 
938
  with col6_1:
939
  with open('ascn_bar.pdf','rb') as f:
940
  st.download_button(
 
669
  printV("Pie1 Posttrace",4)
670
 
671
  col1_1, col1_2 = st.columns(2)
672
+ try:
673
+ fig1.write_image("ascn_pie1.pdf")
674
+ fig1.write_image("ascn_pie1.svg")
675
+ except Exception:
676
+ pass
677
  printV("Pie1 files written",4)
678
  with col1_1:
679
  printV("Pie1 in col1_1",4)
 
721
  fig2.add_trace(go.Pie(values=df4["values"],labels=df4["names"],sort=False))
722
 
723
  col2_1, col2_2 = st.columns(2)
724
+ try:
725
+ fig2.write_image("ascn_pie2.pdf")
726
+ fig2.write_image("ascn_pie2.svg")
727
+ except Exception:
728
+ pass
729
  with col2_1:
730
  with open('ascn_pie2.pdf','rb') as f:
731
  st.download_button(
 
778
  )
779
 
780
  col3_1, col3_2 = st.columns(2)
781
+ try:
782
+ fig3_1.write_image("ascn_sunburst.pdf")
783
+ fig3_1.write_image("ascn_sunburst.svg")
784
+ except Exception:
785
+ pass
786
  with col3_1:
787
  with open('ascn_sunburst.pdf','rb') as f:
788
  st.download_button(
 
835
  )
836
 
837
  col4_1, col4_2 = st.columns(2)
838
+ try:
839
+ fig3.write_image("ascn_treemap.pdf")
840
+ fig3.write_image("ascn_treemap.svg")
841
+ except Exception:
842
+ pass
843
  with col4_1:
844
  with open('ascn_treemap.pdf','rb') as f:
845
  st.download_button(
 
896
  )
897
 
898
  col5_1, col5_2 = st.columns(2)
899
+ try:
900
+ fig_la.write_image("ascn_timeline.pdf")
901
+ fig_la.write_image("ascn_timeline.svg")
902
+ except Exception:
903
+ pass
904
  with col5_1:
905
  with open('ascn_timeline.pdf','rb') as f:
906
  st.download_button(
 
948
  )
949
 
950
  col6_1, col6_2 = st.columns(2)
951
+ try:
952
+ fig_la.write_image("ascn_bar.pdf")
953
+ fig_la.write_image("ascn_bar.svg")
954
+ except Exception:
955
+ pass
956
  with col6_1:
957
  with open('ascn_bar.pdf','rb') as f:
958
  st.download_button(