38 lines
1.0 KiB
Python
38 lines
1.0 KiB
Python
# app.py
|
|
import streamlit as st
|
|
from views.label_views import video_filter_sidebar, video_list_view
|
|
from playlists import playlist_page
|
|
|
|
import argparse
|
|
|
|
# --- Parse arguments (avant tout Streamlit UI) ---
|
|
parser = argparse.ArgumentParser(add_help=False)
|
|
parser.add_argument("--unlabeled", action="store_true", help="Afficher uniquement les vidéos sans labels")
|
|
args, _ = parser.parse_known_args()
|
|
|
|
# ==========================
|
|
# 🧭 Configuration
|
|
# ==========================
|
|
st.set_page_config(page_title="Dance Video Manager", layout="wide")
|
|
st.sidebar.title("💃 Menu principal")
|
|
|
|
page = st.sidebar.radio(
|
|
"Navigation",
|
|
["Vidéos", "Playlists"],
|
|
key="nav_main"
|
|
)
|
|
|
|
# ==========================
|
|
# 🎬 PAGE : VIDÉOS
|
|
# ==========================
|
|
if page == "Vidéos":
|
|
st.title("🎬 Gestion et annotation des vidéos")
|
|
filters = video_filter_sidebar(unlabeled=args.unlabeled)
|
|
video_list_view(filters)
|
|
|
|
# ==========================
|
|
# 🎵 PAGE : PLAYLISTS
|
|
# ==========================
|
|
elif page == "Playlists":
|
|
playlist_page.main()
|