Update app.py
Browse files
app.py
CHANGED
|
@@ -473,6 +473,21 @@ with tab3:
|
|
| 473 |
st.subheader("Concepts to Learn")
|
| 474 |
|
| 475 |
image_conepts = get_image_concepts(st.session_state['image_paths'][image_index])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 476 |
|
| 477 |
st.write(image_conepts)
|
| 478 |
|
|
|
|
| 473 |
st.subheader("Concepts to Learn")
|
| 474 |
|
| 475 |
image_conepts = get_image_concepts(st.session_state['image_paths'][image_index])
|
| 476 |
+
|
| 477 |
+
unique_names = set()
|
| 478 |
+
for region in image_conepts:
|
| 479 |
+
for concept in region.data.concepts:
|
| 480 |
+
name = concept.name
|
| 481 |
+
# Add unique names to the set
|
| 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 |
|