Seetha commited on
Commit
f41922b
1 Parent(s): 138e3ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -39
app.py CHANGED
@@ -502,7 +502,7 @@ def main():
502
  st.download_button(label="Download the detailed result table",data=csv1,file_name='results.csv',mime='text/csv')
503
  # st.download_button(label="Download the result table",data=csv2,file_name='final_data.csv',mime='text/csv')
504
 
505
- st.download_button(label="Download the detailed result table",data=buffer,file_name="df_final.xlsx",mime="application/vnd.ms-excel")
506
  st.download_button(label="Download the result table",data=buffer,file_name="df_tab.xlsx",mime="application/vnd.ms-excel")
507
 
508
  # repo_dir = 'IMA-pipeline-streamlit'
@@ -518,47 +518,35 @@ def main():
518
  # origin.push()
519
 
520
  # # LINK TO THE CSS FILE
521
- def tree_css(file_name):
522
- with open('tree.css')as f:
523
- st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html = True)
524
 
525
- def div_css(file_name):
526
- with open('div.css')as f:
527
- st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html = True)
528
 
529
- def side_css(file_name):
530
- with open('side.css')as f:
531
- st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html = True)
532
 
533
- tree_css('tree.css')
534
- div_css('div.css')
535
- side_css('side.css')
536
- # STREAMLIT_STATIC_PATH = pathlib.Path(st.__path__[0]) / 'static'
537
- # CSS_PATH = (STREAMLIT_STATIC_PATH / "css1")
538
- # if not CSS_PATH.is_dir():
539
- # CSS_PATH.mkdir()
540
-
541
- # css_file = CSS_PATH / "tree.css"
542
- # css_file1 = CSS_PATH / "div.css"
543
- # css_file2 = CSS_PATH / "side.css"
544
- # #jso_file = CSS_PATH / "smalljson.json"
545
- # if not css_file.exists():
546
- # shutil.copy("tree.css", css_file)
547
- # shutil.copy("div.css", css_file1)
548
- # shutil.copy("side.css", css_file2)
549
- # shutil.copy("smalljson.json", jso_file)
550
- STREAMLIT_STATIC_PATH = pathlib.Path(st.__path__[0]) / 'static'
551
- CSS_PATH = (STREAMLIT_STATIC_PATH / "assets/css")
552
- if not CSS_PATH.is_dir():
553
- CSS_PATH.mkdir()
554
-
555
- css_file = CSS_PATH / "tree.css"
556
- css_file1 = CSS_PATH / "div.css"
557
- css_file2 = CSS_PATH / "side.css"
558
- if not css_file.exists():
559
- shutil.copy("assets/css/tree.css", css_file)
560
- shutil.copy("assets/css/div.css", css_file1)
561
- shutil.copy("assets/css/side.css", css_file2)
562
  HtmlFile = open("index.html", 'r', encoding='utf-8')
563
  source_code = HtmlFile.read()
564
  #print(source_code)
 
502
  st.download_button(label="Download the detailed result table",data=csv1,file_name='results.csv',mime='text/csv')
503
  # st.download_button(label="Download the result table",data=csv2,file_name='final_data.csv',mime='text/csv')
504
 
505
+ #st.download_button(label="Download the detailed result table",data=buffer,file_name="df_final.xlsx",mime="application/vnd.ms-excel")
506
  st.download_button(label="Download the result table",data=buffer,file_name="df_tab.xlsx",mime="application/vnd.ms-excel")
507
 
508
  # repo_dir = 'IMA-pipeline-streamlit'
 
518
  # origin.push()
519
 
520
  # # LINK TO THE CSS FILE
521
+ # def tree_css(file_name):
522
+ # with open('tree.css')as f:
523
+ # st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html = True)
524
 
525
+ # def div_css(file_name):
526
+ # with open('div.css')as f:
527
+ # st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html = True)
528
 
529
+ # def side_css(file_name):
530
+ # with open('side.css')as f:
531
+ # st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html = True)
532
 
533
+ # tree_css('tree.css')
534
+ # div_css('div.css')
535
+ # side_css('side.css')
536
+
537
+
538
+ # STREAMLIT_STATIC_PATH = pathlib.Path(st.__path__[0]) / 'static'
539
+ # CSS_PATH = (STREAMLIT_STATIC_PATH / "assets/css")
540
+ # if not CSS_PATH.is_dir():
541
+ # CSS_PATH.mkdir()
542
+
543
+ # css_file = CSS_PATH / "tree.css"
544
+ # css_file1 = CSS_PATH / "div.css"
545
+ # css_file2 = CSS_PATH / "side.css"
546
+ # if not css_file.exists():
547
+ # shutil.copy("assets/css/tree.css", css_file)
548
+ # shutil.copy("assets/css/div.css", css_file1)
549
+ # shutil.copy("assets/css/side.css", css_file2)
 
 
 
 
 
 
 
 
 
 
 
 
550
  HtmlFile = open("index.html", 'r', encoding='utf-8')
551
  source_code = HtmlFile.read()
552
  #print(source_code)