Update app.py
Browse files
app.py
CHANGED
|
@@ -470,7 +470,8 @@ with tab3:
|
|
| 470 |
with col1:
|
| 471 |
|
| 472 |
st.header("Image Details")
|
| 473 |
-
st.
|
|
|
|
| 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(
|
| 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("
|
| 508 |
-
st.
|
| 509 |
-
|
|
|
|
| 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 |
|