artintel235 commited on
Commit
fed4d56
·
verified ·
1 Parent(s): d6f3f1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -444,14 +444,14 @@ def main_app():
444
 
445
  # Display modal if an image is selected
446
  if st.session_state.selected_image:
447
- with st.container(border = True):
448
- st.image(st.session_state.selected_image['image_url'], use_column_width=True)
449
- st.write(f"**Prompt:** {st.session_state.selected_image['prompt']}")
450
- st.write(f"**Aspect Ratio:** {st.session_state.selected_image['aspect_ratio']}")
451
- st.write(f"**Realism:** {st.session_state.selected_image['realism']}")
452
- download_path = download_image(st.session_state.selected_image['image_url'])
453
- if download_path:
454
- st.download_button(label="Download Image", data = open(download_path, "rb"), file_name = f"image.png", key=f"download_overlay_{uuid.uuid4()}")
455
 
456
  if st.button("Close"):
457
  st.session_state.selected_image = None # close the modal when "close" is clicked
 
444
 
445
  # Display modal if an image is selected
446
  if st.session_state.selected_image:
447
+ with st.container(border=True):
448
+ st.image(cloud_storage_url, use_column_width=True) # Display high-res image from URL
449
+ st.write(f"**Prompt:** {prompt}")
450
+ st.write(f"**Aspect Ratio:** {aspect_ratio}")
451
+ st.write(f"**Realism:** {realism}")
452
+ download_path = download_image(image_url)
453
+ if download_path:
454
+ st.download_button(label="Download Image", data = open(download_path, "rb"), file_name = f"image.png", key=f"download_high_res_{uuid.uuid4()}")
455
 
456
  if st.button("Close"):
457
  st.session_state.selected_image = None # close the modal when "close" is clicked