roy214 commited on
Commit
14d4cb7
·
verified ·
1 Parent(s): 92711bf

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +3 -2
src/streamlit_app.py CHANGED
@@ -166,13 +166,14 @@ The goal of this system is to retrieve the most relevant fashion images based on
166
  # Example to show some images
167
  st.subheader("Some Sample Images and Their Captions:")
168
  example = [13422, 10037, 38246, 23273, 2008]
 
169
  for idx, img_id in enumerate(example):
170
- show_img(img_id, None, idx)
171
 
172
  # Chạy ví dụ với prompt
173
  st.subheader("Example Usage: Enter a Prompt to Retrieve Related Images")
174
  prompt_input = st.text_input("Enter a prompt", "a red Apparel dress")
175
  top_k_input = st.number_input("Enter the number of results (top_k)", min_value=1, max_value=10, value=5)
176
 
177
- if prompt_input:
178
  running(prompt_input, top_k_input)
 
166
  # Example to show some images
167
  st.subheader("Some Sample Images and Their Captions:")
168
  example = [13422, 10037, 38246, 23273, 2008]
169
+ cols = st.columns(5) # Chia thành 5 cột
170
  for idx, img_id in enumerate(example):
171
+ show_img(img_id, None, cols[idx])
172
 
173
  # Chạy ví dụ với prompt
174
  st.subheader("Example Usage: Enter a Prompt to Retrieve Related Images")
175
  prompt_input = st.text_input("Enter a prompt", "a red Apparel dress")
176
  top_k_input = st.number_input("Enter the number of results (top_k)", min_value=1, max_value=10, value=5)
177
 
178
+ if st.button("Find top 5 related images:"):
179
  running(prompt_input, top_k_input)