Spaces:
Sleeping
Sleeping
LaurentTRIPIED
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4 |
import streamlit as st
|
5 |
import PyPDF2
|
6 |
import json
|
|
|
7 |
|
8 |
###################################################
|
9 |
# LES FONCTIONS DE CONVERSION PDF -> TEXTE -> JSON
|
@@ -61,4 +62,10 @@ try:
|
|
61 |
mime="application/json"
|
62 |
)
|
63 |
except FileNotFoundError:
|
64 |
-
st.error(f"Le fichier {json_output_path} n'est pas disponible pour téléchargement.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
import streamlit as st
|
5 |
import PyPDF2
|
6 |
import json
|
7 |
+
import os
|
8 |
|
9 |
###################################################
|
10 |
# LES FONCTIONS DE CONVERSION PDF -> TEXTE -> JSON
|
|
|
62 |
mime="application/json"
|
63 |
)
|
64 |
except FileNotFoundError:
|
65 |
+
st.error(f"Le fichier {json_output_path} n'est pas disponible pour téléchargement.")
|
66 |
+
|
67 |
+
# Vérifier si le fichier existe dans le répertoire data/
|
68 |
+
if os.path.exists(json_output_path):
|
69 |
+
st.success(f"Le fichier {json_output_path} existe dans le répertoire data.")
|
70 |
+
else:
|
71 |
+
st.error(f"Le fichier {json_output_path} n'existe pas dans le répertoire data.")
|