Update app.py
Browse files192 unmodified lines1931941951961971981992 unmodified lines20220320420520620726 unmodified lines234235236237238239192 unmodified lines# Créer un dictionnaire pour les noms personnaliséscustom_names = {}if speaker_names is not None:for row in speaker_names:if isinstance(row, dict):speaker_id = row.get("Speaker ID")2 unmodified linescustom_names[speaker_id] = custom_nameelif isinstance(row, (list, tuple)) and len(row) == 2:custom_names[row[0]] = row[1]print("custom_names créé :", custom_names)26 unmodified lines"""print("Fin de format_to_markdown")return formatted_outputdef _return_yt_html_embed(yt_url):video_id = yt_url.split("?v=")[-1]192 unmodified lines1931941951961971981992 unmodified lines20220320420520620720820921021121221321426 unmodified lines241242243244245246247192 unmodified lines# Créer un dictionnaire pour les noms personnaliséscustom_names = {}if speaker_names is not None and isinstance(speaker_names, list):for row in speaker_names:if isinstance(row, dict):speaker_id = row.get("Speaker ID")2 unmodified linescustom_names[speaker_id] = custom_nameelif isinstance(row, (list, tuple)) and len(row) == 2:custom_names[row[0]] = row[1]elif speaker_names is not None:# Traitement pour le cas où speaker_names est un DataFramefor index, row in speaker_names.iterrows():speaker_id = row.get("Speaker ID")custom_name = row.get("Nom personnalisé")if speaker_id and custom_name:custom_names[speaker_id] = custom_nameprint("custom_names créé :", custom_names)26 unmodified lines"""print("Fin de format_to_markdown")return formatted_outputdef _return_yt_html_embed(yt_url):video_id = yt_url.split("?v=")[-1]
app.py+9-1