eaglelandsonce commited on
Commit
9c73d52
·
verified ·
1 Parent(s): a316c72

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -470,7 +470,8 @@ with tab3:
470
  with col1:
471
 
472
  st.header("Image Details")
473
- st.subheader("Concepts to Learn")
 
474
 
475
  image_conepts = get_image_concepts(st.session_state['image_paths'][image_index])
476
 
@@ -482,29 +483,29 @@ with tab3:
482
  unique_names.add(name)
483
 
484
  # Display unique names
 
485
  if unique_names:
486
- st.write("Unique items detected in the image:")
487
  for name in unique_names:
488
- st.write(name)
489
  else:
490
  st.write("No unique items detected.")
491
 
492
  st.write(image_conepts)
493
-
494
  st.divider()
495
-
496
  st.subheader("Description of Our Image")
497
-
498
  image_text_output = analyze_image(st.session_state['image_paths'][image_index])
499
 
500
  st.write(image_text_output)
501
-
502
  st.divider()
503
 
504
  st.header("Create a Story About This Image")
 
 
505
 
506
  # Button for actions related to the selected image
507
- if st.button("Details", key=f"details_{image_index}"):
508
- st.write(f"You clicked on image {image_index + 1}")
509
- # Add more actions for the click event here
 
510
 
 
470
  with col1:
471
 
472
  st.header("Image Details")
473
+ st.divider()
474
+ st.subheader("Image Components")
475
 
476
  image_conepts = get_image_concepts(st.session_state['image_paths'][image_index])
477
 
 
483
  unique_names.add(name)
484
 
485
  # Display unique names
486
+
487
  if unique_names:
 
488
  for name in unique_names:
489
+ st.write(', '.join(unique_names))
490
  else:
491
  st.write("No unique items detected.")
492
 
493
  st.write(image_conepts)
 
494
  st.divider()
 
495
  st.subheader("Description of Our Image")
496
+
497
  image_text_output = analyze_image(st.session_state['image_paths'][image_index])
498
 
499
  st.write(image_text_output)
 
500
  st.divider()
501
 
502
  st.header("Create a Story About This Image")
503
+
504
+
505
 
506
  # Button for actions related to the selected image
507
+ if st.button("Create a New Story"):
508
+ st.session_state['text_block'] = image_text_output
509
+ switch_tab(2)
510
+
511