awacke1 commited on
Commit
416bd1d
·
1 Parent(s): e089750

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -42,7 +42,8 @@ div.markdown("""
42
  </style>
43
  """, unsafe_allow_html=True)
44
 
45
- # Add the uploaded files to the div and make it move around the screen
46
  if file_list:
47
  for file in file_list:
48
- div.markdown(f'<div class="sticky">{file.name}</div>', unsafe_allow_html=True)
 
 
42
  </style>
43
  """, unsafe_allow_html=True)
44
 
45
+ # Add the uploaded files to the div as an anchor tag with an image that opens in a new tab
46
  if file_list:
47
  for file in file_list:
48
+ url = URL_TO_OPEN_WHEN_CLICKED # Replace with the URL to open when the image is clicked
49
+ div.markdown(f'<a href="{url}" target="_blank"><img src="data:image/png;base64,{file}" class="sticky"></a>', unsafe_allow_html=True)