Spaces:
Sleeping
Sleeping
output image caption removed and replaced with text above the image
Browse files
app.py
CHANGED
@@ -47,8 +47,6 @@ def main():
|
|
47 |
image_path='card_image.jpg'
|
48 |
)
|
49 |
|
50 |
-
st.write(card_confidence)
|
51 |
-
|
52 |
if card_confidence == 0:
|
53 |
display_text = "A card is not detected in the image!!!"
|
54 |
st.image('card_image.jpg', caption=f"{display_text}", use_column_width=True)
|
@@ -76,8 +74,11 @@ def main():
|
|
76 |
draw.text((x1, y1), text, fill="red")
|
77 |
# Saving Images
|
78 |
image_resized.save('card_highlighted_image.jpg')
|
79 |
-
|
80 |
-
|
|
|
|
|
|
|
81 |
|
82 |
st.session_state.pop("card")
|
83 |
|
|
|
47 |
image_path='card_image.jpg'
|
48 |
)
|
49 |
|
|
|
|
|
50 |
if card_confidence == 0:
|
51 |
display_text = "A card is not detected in the image!!!"
|
52 |
st.image('card_image.jpg', caption=f"{display_text}", use_column_width=True)
|
|
|
74 |
draw.text((x1, y1), text, fill="red")
|
75 |
# Saving Images
|
76 |
image_resized.save('card_highlighted_image.jpg')
|
77 |
+
|
78 |
+
display_text = f'Here is the card number on the image with {card_confidence:.4f} confidence.'
|
79 |
+
st.write(f"{display_text}")
|
80 |
+
# st.image('card_highlighted_image.jpg', caption=f"{display_text}", use_column_width=True)
|
81 |
+
st.image('card_highlighted_image.jpg', use_column_width=True)
|
82 |
|
83 |
st.session_state.pop("card")
|
84 |
|