awacke1 commited on
Commit
8b74955
1 Parent(s): 9f63d2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -82,9 +82,8 @@ def show_files_in_directory():
82
  if file.endswith((".md", ".xlsx", ".csv")):
83
  file_size = os.path.getsize(file)
84
  file_modified_time = datetime.datetime.fromtimestamp(os.path.getmtime(file)).strftime("%Y-%m-%d %H:%M:%S")
85
- files.append({"File Name": file, "Size (bytes)": file_size, "Last Modified": file_modified_time})
86
  files_df = pd.DataFrame(files)
87
- files_df["File Name"] = files_df["File Name"].apply(lambda x: f'<a href="{x}" download>{x}</a>')
88
  st.write(files_df.to_html(escape=False, index=False), unsafe_allow_html=True)
89
 
90
  def main():
 
82
  if file.endswith((".md", ".xlsx", ".csv")):
83
  file_size = os.path.getsize(file)
84
  file_modified_time = datetime.datetime.fromtimestamp(os.path.getmtime(file)).strftime("%Y-%m-%d %H:%M:%S")
85
+ files.append({"File Name": get_download_link(file), "Size (bytes)": file_size, "Last Modified": file_modified_time})
86
  files_df = pd.DataFrame(files)
 
87
  st.write(files_df.to_html(escape=False, index=False), unsafe_allow_html=True)
88
 
89
  def main():