Spaces:
Sleeping
Sleeping
Make example videos smaller in UI
Browse files- streamlit_app.py +7 -4
streamlit_app.py
CHANGED
@@ -393,10 +393,13 @@ else:
|
|
393 |
for i, example_file in enumerate(example_files):
|
394 |
example_full_path = os.path.join(example_video_dir, example_file)
|
395 |
with cols[i]:
|
396 |
-
|
397 |
-
st.
|
398 |
-
|
399 |
-
|
|
|
|
|
|
|
400 |
# --- End Example Videos Section ---
|
401 |
|
402 |
process_button_main = st.button("Detect Mites from Uploaded Video")
|
|
|
393 |
for i, example_file in enumerate(example_files):
|
394 |
example_full_path = os.path.join(example_video_dir, example_file)
|
395 |
with cols[i]:
|
396 |
+
# Use nested columns to control width (e.g., 2/3 width for video column)
|
397 |
+
vid_col, _ = st.columns([2, 1])
|
398 |
+
with vid_col:
|
399 |
+
st.markdown(f"**{example_file}**") # Display filename
|
400 |
+
st.video(example_full_path) # Display the video
|
401 |
+
if st.button(f"Use Example: {example_file}", key=f"ex_{i}"): # Use unique key for buttons
|
402 |
+
clicked_example = example_full_path
|
403 |
# --- End Example Videos Section ---
|
404 |
|
405 |
process_button_main = st.button("Detect Mites from Uploaded Video")
|