sergioska commited on
Commit
6fe3222
·
1 Parent(s): 985c4fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- image = None
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.image(image)
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.image(outputImage)
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