13ze commited on
Commit
041c2d9
·
verified ·
1 Parent(s): 724a687

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -38,7 +38,10 @@ for folder, files in files.items():
38
  for file in files:
39
  file_path = os.path.join(folder, file)
40
  file_url = f"storage/{file_path}"
41
- st.markdown(f"[{file}]({file_url})")
 
 
 
42
 
43
  # Deletar arquivo
44
  st.header("Deletar Arquivo")
 
38
  for file in files:
39
  file_path = os.path.join(folder, file)
40
  file_url = f"storage/{file_path}"
41
+ if file.lower().endswith(('.png', '.jpg', '.jpeg', '.gif', '.webp')):
42
+ st.image(file_url, caption=file, use_column_width=True)
43
+ else:
44
+ st.markdown(f"[{file}]({file_url})")
45
 
46
  # Deletar arquivo
47
  st.header("Deletar Arquivo")