witchEverly commited on
Commit
0429e40
ยท
verified ยท
1 Parent(s): a83b821

Update pages/๐Ÿ“ธ_InstaMuse.py

Browse files
Files changed (1) hide show
  1. pages/๐Ÿ“ธ_InstaMuse.py +9 -9
pages/๐Ÿ“ธ_InstaMuse.py CHANGED
@@ -78,15 +78,15 @@ if file:
78
  with col1:
79
  st.markdown("## ๐Ÿ“ธ Your Image:")
80
  st.image(image, caption='Uploaded Image', use_column_width=True)
81
- try:
82
- desc = caption_generator.image_2_text(image)
83
- captions, caption_list, img_description = caption_generator.text_2_caption(desc)
84
- st.session_state['captions'] = captions
85
- st.session_state['caption_list'] = caption_list
86
- st.session_state['img_description'] = img_description
87
- except Exception as e:
88
- st.error(f"Error generating captions: {e}")
89
- captions = None
90
 
91
  with col2:
92
  if captions:
 
78
  with col1:
79
  st.markdown("## ๐Ÿ“ธ Your Image:")
80
  st.image(image, caption='Uploaded Image', use_column_width=True)
81
+ try:
82
+ desc = caption_generator.image_2_text(image)
83
+ captions, caption_list, img_description = caption_generator.text_2_caption(desc)
84
+ st.session_state['captions'] = captions
85
+ st.session_state['caption_list'] = caption_list
86
+ st.session_state['img_description'] = img_description
87
+ except Exception as e:
88
+ st.error(f"Error generating captions: {e}")
89
+ captions = None
90
 
91
  with col2:
92
  if captions: