manika07 commited on
Commit
43beb71
Β·
1 Parent(s): bcbd3ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -45,8 +45,8 @@ tab1, tab2, tab3 = st.tabs(["πŸ“ˆ Load Data", "πŸ“ƒ Tagged ETDs", "πŸ““ Download
45
  with tab1:
46
  #===load data===
47
  if uploaded_file is not None:
48
- df = pd.read_csv(uploaded_file, encoding='latin-1')
49
- st.dataframe(df)
50
 
51
 
52
  with tab2:
@@ -66,7 +66,7 @@ with tab3:
66
  #===download result===
67
  # Create a download button
68
  if st.sidebar.button("Download"):
69
- csv = df.to_csv(index=False)
70
- b64 = base64.b64encode(csv.encode()).decode()
71
- href = f'<a href="data:file/csv;base64,{b64}" download="results.csv">Download csv file</a>'
72
- st.markdown(href, unsafe_allow_html=True)
 
45
  with tab1:
46
  #===load data===
47
  if uploaded_file is not None:
48
+ df = pd.read_csv(uploaded_file, encoding='latin-1')
49
+ st.dataframe(df)
50
 
51
 
52
  with tab2:
 
66
  #===download result===
67
  # Create a download button
68
  if st.sidebar.button("Download"):
69
+ csv = df.to_csv(index=False)
70
+ b64 = base64.b64encode(csv.encode()).decode()
71
+ href = f'<a href="data:file/csv;base64,{b64}" download="results.csv">Download csv file</a>'
72
+ st.markdown(href, unsafe_allow_html=True)