Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- 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
|
| 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)
|