Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ st.title('Upload an image file to detection')
|
|
| 12 |
|
| 13 |
uploaded_image_zero_file = st.file_uploader("Choose an image file (zero)")
|
| 14 |
|
| 15 |
-
|
| 16 |
if st.button('apply tag'):
|
| 17 |
tags = [['products', 'price', 'title']]
|
| 18 |
|
|
@@ -27,7 +27,7 @@ if st.button('apply tag'):
|
|
| 27 |
draw.rectangle((xmin, ymin, xmax, ymax), outline="red", width=3)
|
| 28 |
draw.text((xmin, ymin), f"{label}: {round(score,5)}", fill="white")
|
| 29 |
|
| 30 |
-
st.
|
| 31 |
st.write(predictions)
|
| 32 |
|
| 33 |
if uploaded_image_zero_file is not None:
|
|
@@ -37,7 +37,7 @@ if uploaded_image_zero_file is not None:
|
|
| 37 |
image,
|
| 38 |
candidate_labels=['product']
|
| 39 |
)
|
| 40 |
-
st.
|
| 41 |
|
| 42 |
|
| 43 |
|
|
|
|
| 12 |
|
| 13 |
uploaded_image_zero_file = st.file_uploader("Choose an image file (zero)")
|
| 14 |
|
| 15 |
+
imageLocation = st.empty()
|
| 16 |
if st.button('apply tag'):
|
| 17 |
tags = [['products', 'price', 'title']]
|
| 18 |
|
|
|
|
| 27 |
draw.rectangle((xmin, ymin, xmax, ymax), outline="red", width=3)
|
| 28 |
draw.text((xmin, ymin), f"{label}: {round(score,5)}", fill="white")
|
| 29 |
|
| 30 |
+
st.imageLocation(image)
|
| 31 |
st.write(predictions)
|
| 32 |
|
| 33 |
if uploaded_image_zero_file is not None:
|
|
|
|
| 37 |
image,
|
| 38 |
candidate_labels=['product']
|
| 39 |
)
|
| 40 |
+
st.imageLocation(outputImage)
|
| 41 |
|
| 42 |
|
| 43 |
|