Update app.py
Browse files
app.py
CHANGED
@@ -202,13 +202,14 @@ def show_file_content(file_path):
|
|
202 |
try:
|
203 |
|
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]({
|
212 |
st.markdown(markdown_link, unsafe_allow_html=True)
|
213 |
|
214 |
#if file_extension in ['.png', '.jpg', '.jpeg']:
|
|
|
202 |
try:
|
203 |
|
204 |
if file_extension in ['.png', '.jpg', '.jpeg']:
|
205 |
+
image_url = file_path.Replace('File: ','')
|
206 |
+
st.write('Image URL:' + image_url)
|
207 |
# Check if the base_url needs to be prepended
|
208 |
#if base_url and not file_path.startswith(("http://", "https://")):
|
209 |
#image_url = os.path.join(base_url, file_path)
|
210 |
|
211 |
# Create a Markdown link to view the image
|
212 |
+
markdown_link = f"[![Image]({image_url})]({image_url})" #file_path
|
213 |
st.markdown(markdown_link, unsafe_allow_html=True)
|
214 |
|
215 |
#if file_extension in ['.png', '.jpg', '.jpeg']:
|