Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -104,8 +104,13 @@ actu_finale = st.text_area("📝 News", value=st.session_state['actu'])
|
|
| 104 |
if st.button("🎬 GÉNÉRER LA VIDÉO"):
|
| 105 |
if joueur and actu_finale:
|
| 106 |
with st.spinner("🛠️ Montage en cours..."):
|
| 107 |
-
|
|
|
|
|
|
|
|
|
|
| 108 |
if fichier and os.path.exists(fichier):
|
| 109 |
st.video(fichier)
|
| 110 |
with open(fichier, "rb") as f:
|
| 111 |
-
st.download_button("📥 Télécharger", f, file_name=fichier)
|
|
|
|
|
|
|
|
|
| 104 |
if st.button("🎬 GÉNÉRER LA VIDÉO"):
|
| 105 |
if joueur and actu_finale:
|
| 106 |
with st.spinner("🛠️ Montage en cours..."):
|
| 107 |
+
# Pas de asyncio.run ici, appel direct
|
| 108 |
+
fichier = creer_video_expert(joueur, actu_finale)
|
| 109 |
+
|
| 110 |
+
# Vérification de l'existence du fichier (Ligne 108)
|
| 111 |
if fichier and os.path.exists(fichier):
|
| 112 |
st.video(fichier)
|
| 113 |
with open(fichier, "rb") as f:
|
| 114 |
+
st.download_button("📥 Télécharger", f, file_name=fichier)
|
| 115 |
+
else:
|
| 116 |
+
st.error("Échec de la génération de la vidéo. Vérifie tes clés API.")
|