Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -216,10 +216,11 @@ def main():
|
|
216 |
all_files.sort(key=lambda x: (os.path.splitext(x)[1], x), reverse=True) # sort by file type and file name in descending order
|
217 |
|
218 |
for file in all_files:
|
219 |
-
col1,
|
220 |
with col1:
|
|
|
221 |
st.markdown(get_table_download_link(file), unsafe_allow_html=True)
|
222 |
-
|
223 |
if st.button("π", key="read_"+file): # search emoji button
|
224 |
with open(file, 'r') as f:
|
225 |
file_contents = f.read()
|
@@ -233,6 +234,7 @@ def main():
|
|
233 |
filename = generate_filename(user_prompt, choice)
|
234 |
create_file(filename, user_prompt, response)
|
235 |
st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
|
|
|
236 |
with col3:
|
237 |
if st.button("π", key="delete_"+file):
|
238 |
os.remove(file)
|
|
|
216 |
all_files.sort(key=lambda x: (os.path.splitext(x)[1], x), reverse=True) # sort by file type and file name in descending order
|
217 |
|
218 |
for file in all_files:
|
219 |
+
col1, col3 = st.sidebar.columns([5,1]) # adjust the ratio as needed
|
220 |
with col1:
|
221 |
+
|
222 |
st.markdown(get_table_download_link(file), unsafe_allow_html=True)
|
223 |
+
|
224 |
if st.button("π", key="read_"+file): # search emoji button
|
225 |
with open(file, 'r') as f:
|
226 |
file_contents = f.read()
|
|
|
234 |
filename = generate_filename(user_prompt, choice)
|
235 |
create_file(filename, user_prompt, response)
|
236 |
st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
|
237 |
+
|
238 |
with col3:
|
239 |
if st.button("π", key="delete_"+file):
|
240 |
os.remove(file)
|