hkhho commited on
Commit
b14627c
·
1 Parent(s): d295684

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -18,18 +18,21 @@ model.eval()
18
  st.title('Zero-shot Object Detection')
19
 
20
  # Input image and query image upload
21
- col1, col2 = st.beta_columns(2)
22
  with col1:
23
  uploaded_image = st.file_uploader("Upload input image", type=["jpg", "jpeg", "png"])
24
  if uploaded_image is not None:
25
  image = Image.open(uploaded_image)
26
  st.image(image, caption='Input Image', use_column_width=True)
27
-
 
28
  with col2:
29
  uploaded_query = st.file_uploader("Upload query image", type=["jpg", "jpeg", "png"])
30
  if uploaded_query is not None:
31
  query_image = Image.open(uploaded_query)
32
  st.image(query_image, caption='Query Image', use_column_width=True)
 
 
33
 
34
  # Threshold ratio bar and class name input
35
  threshold_ratio = st.slider('Select threshold ratio:', min_value=0.0, max_value=1.0, step=0.1, value=0.6)
 
18
  st.title('Zero-shot Object Detection')
19
 
20
  # Input image and query image upload
21
+ col1, col2 = st.columns(2)
22
  with col1:
23
  uploaded_image = st.file_uploader("Upload input image", type=["jpg", "jpeg", "png"])
24
  if uploaded_image is not None:
25
  image = Image.open(uploaded_image)
26
  st.image(image, caption='Input Image', use_column_width=True)
27
+ else:
28
+ st.image('1.png', caption='Input Image', use_column_width=True)
29
  with col2:
30
  uploaded_query = st.file_uploader("Upload query image", type=["jpg", "jpeg", "png"])
31
  if uploaded_query is not None:
32
  query_image = Image.open(uploaded_query)
33
  st.image(query_image, caption='Query Image', use_column_width=True)
34
+ else:
35
+ st.image('0.png', caption='Input Image', use_column_width=True)
36
 
37
  # Threshold ratio bar and class name input
38
  threshold_ratio = st.slider('Select threshold ratio:', min_value=0.0, max_value=1.0, step=0.1, value=0.6)