label editor

This commit is contained in:
Gabriel Radureau
2025-10-12 15:37:08 +02:00
parent 9cb9790974
commit cc9fb9cede
5 changed files with 367 additions and 150 deletions

20
app/views.py Normal file
View File

@@ -0,0 +1,20 @@
import streamlit as st
import os
def show_video_thumbnail(video):
col1, col2, col3 = st.columns([1, 2, 1])
video_name = video["mp4_file_name"]
thumb = video["thumbnail_file"]
mp4 = video["mp4_file"]
with col1:
if os.path.exists(thumb):
st.image(thumb, width="content")
st.caption(video_name)
with col2:
if os.path.exists(mp4):
if st.button(f"▶️ Lire 📅 {video.get('record_datetime', '')} — 🕒 {video.get('day_of_week', '')}", key=f"play_{video_name}"):
st.video(mp4)
return col3