awacke1 commited on
Commit
eac9f0e
ยท
1 Parent(s): 0596468

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -383,7 +383,13 @@ def main():
383
  all_files = [file for file in all_files if len(os.path.splitext(file)[0]) >= 20] # exclude files with short names
384
  all_files.sort(key=lambda x: (os.path.splitext(x)[1], x), reverse=True) # sort by file type and file name in descending order
385
 
386
- # sidebar of files
 
 
 
 
 
 
387
  file_contents=''
388
  next_action=''
389
  for file in all_files:
@@ -450,9 +456,3 @@ with st.sidebar:
450
  filename = generate_filename(raw, 'txt')
451
  create_file(filename, raw, '', should_save)
452
  #create_file(filename, raw, '')
453
-
454
- # Added "Delete All" button
455
- if st.sidebar.button("๐Ÿ—‘ Delete All"):
456
- for file in all_files:
457
- os.remove(file)
458
- st.experimental_rerun()
 
383
  all_files = [file for file in all_files if len(os.path.splitext(file)[0]) >= 20] # exclude files with short names
384
  all_files.sort(key=lambda x: (os.path.splitext(x)[1], x), reverse=True) # sort by file type and file name in descending order
385
 
386
+ # Sidebar of Files Saving History and surfacing files as context of prompts and responses
387
+ # Added "Delete All" button
388
+ if st.sidebar.button("๐Ÿ—‘ Delete All"):
389
+ for file in all_files:
390
+ os.remove(file)
391
+ st.experimental_rerun()
392
+
393
  file_contents=''
394
  next_action=''
395
  for file in all_files:
 
456
  filename = generate_filename(raw, 'txt')
457
  create_file(filename, raw, '', should_save)
458
  #create_file(filename, raw, '')