Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -169,23 +169,12 @@ def main():
|
|
169 |
with col1:
|
170 |
st.markdown(get_table_download_link(file), unsafe_allow_html=True)
|
171 |
with col2:
|
172 |
-
if st.button("π", key=file):
|
173 |
get_browse_file_link(file)
|
174 |
with col3:
|
175 |
-
if st.button("π", key=file):
|
176 |
os.remove(file)
|
177 |
st.experimental_rerun()
|
178 |
|
179 |
-
|
180 |
-
#all_files = glob.glob("*.txt") + glob.glob("*.htm") + glob.glob("*.md")
|
181 |
-
#for file in all_files:
|
182 |
-
# col1, col2 = st.sidebar.columns([4,1]) # adjust the ratio as needed
|
183 |
-
# with col1:
|
184 |
-
# st.markdown(get_table_download_link(file), unsafe_allow_html=True)
|
185 |
-
# with col2:
|
186 |
-
# if st.button("π", key=file):
|
187 |
-
# os.remove(file)
|
188 |
-
# st.experimental_rerun()
|
189 |
-
|
190 |
if __name__ == "__main__":
|
191 |
main()
|
|
|
169 |
with col1:
|
170 |
st.markdown(get_table_download_link(file), unsafe_allow_html=True)
|
171 |
with col2:
|
172 |
+
if st.button("π", key="browse_"+file):
|
173 |
get_browse_file_link(file)
|
174 |
with col3:
|
175 |
+
if st.button("π", key="delete_"+file):
|
176 |
os.remove(file)
|
177 |
st.experimental_rerun()
|
178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
if __name__ == "__main__":
|
180 |
main()
|