awacke1 commited on
Commit
9337711
β€’
1 Parent(s): 5e39c57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -140,12 +140,23 @@ def main():
140
  if len(file_content) > 0:
141
  st.markdown(f"**File Content Added:**\n{file_content}")
142
 
 
 
 
 
 
 
 
143
  all_files = glob.glob("*.txt") + glob.glob("*.htm") + glob.glob("*.md")
144
  for file in all_files:
145
- st.sidebar.markdown(get_table_download_link(file), unsafe_allow_html=True)
146
- if st.sidebar.button("πŸ—‘", key=file):
147
- os.remove(file)
148
- st.experimental_rerun()
 
 
 
 
149
 
150
  if __name__ == "__main__":
151
  main()
 
140
  if len(file_content) > 0:
141
  st.markdown(f"**File Content Added:**\n{file_content}")
142
 
143
+ #all_files = glob.glob("*.txt") + glob.glob("*.htm") + glob.glob("*.md")
144
+ #for file in all_files:
145
+ # st.sidebar.markdown(get_table_download_link(file), unsafe_allow_html=True)
146
+ # if st.sidebar.button("πŸ—‘", key=file):
147
+ # os.remove(file)
148
+ # st.experimental_rerun()
149
+
150
  all_files = glob.glob("*.txt") + glob.glob("*.htm") + glob.glob("*.md")
151
  for file in all_files:
152
+ col1, col2 = st.sidebar.columns([4,1]) # adjust the ratio as needed
153
+ with col1:
154
+ st.markdown(get_table_download_link(file), unsafe_allow_html=True)
155
+ with col2:
156
+ if st.button("πŸ—‘", key=file):
157
+ os.remove(file)
158
+ st.experimental_rerun()
159
+
160
 
161
  if __name__ == "__main__":
162
  main()