awacke1 commited on
Commit
2418a4c
·
verified ·
1 Parent(s): 6f0f7e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -204,11 +204,11 @@ def show_file_content(file_path):
204
  if file_extension in ['.png', '.jpg', '.jpeg']:
205
  image_url = file_path
206
  # Check if the base_url needs to be prepended
207
- if base_url and not file_path.startswith(("http://", "https://")):
208
- image_url = os.path.join(base_url, file_path)
209
 
210
  # Create a Markdown link to view the image
211
- markdown_link = f"[![View Image]({image_url})]({image_url})"
212
  st.markdown(markdown_link, unsafe_allow_html=True)
213
 
214
  #if file_extension in ['.png', '.jpg', '.jpeg']:
 
204
  if file_extension in ['.png', '.jpg', '.jpeg']:
205
  image_url = file_path
206
  # Check if the base_url needs to be prepended
207
+ #if base_url and not file_path.startswith(("http://", "https://")):
208
+ #image_url = os.path.join(base_url, file_path)
209
 
210
  # Create a Markdown link to view the image
211
+ markdown_link = f"[![Image]({file_path})]({file_path})" #file_path
212
  st.markdown(markdown_link, unsafe_allow_html=True)
213
 
214
  #if file_extension in ['.png', '.jpg', '.jpeg']: