Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,3 @@
|
|
| 1 |
-
...
|
| 2 |
-
|
| 3 |
-
|
| 4 |
import gradio as gr
|
| 5 |
import os
|
| 6 |
import shutil
|
|
@@ -11,14 +8,6 @@ from PIL import Image
|
|
| 11 |
import re
|
| 12 |
from datetime import datetime
|
| 13 |
|
| 14 |
-
# Chemins des dossiers
|
| 15 |
-
UPLOAD_FOLDER = 'uploads'
|
| 16 |
-
RESULT_FOLDER = 'results'
|
| 17 |
-
|
| 18 |
-
# Créer les dossiers si nécessaire
|
| 19 |
-
os.makedirs(UPLOAD_FOLDER, exist_ok=True)
|
| 20 |
-
os.makedirs(RESULT_FOLDER, exist_ok=True)
|
| 21 |
-
|
| 22 |
# Fonction pour afficher la documentation directement dans l'interface
|
| 23 |
def afficher_doc():
|
| 24 |
return """
|
|
@@ -175,6 +164,7 @@ with gr.Blocks(title="Assistant de Traitement des Notifications PDF") as demo:
|
|
| 175 |
# Fonction pour afficher la documentation lorsque le bouton est cliqué
|
| 176 |
btn_doc.click(
|
| 177 |
fn=afficher_doc,
|
|
|
|
| 178 |
outputs=output_doc
|
| 179 |
)
|
| 180 |
|
|
@@ -195,4 +185,3 @@ with gr.Blocks(title="Assistant de Traitement des Notifications PDF") as demo:
|
|
| 195 |
)
|
| 196 |
|
| 197 |
demo.launch(share=True)
|
| 198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
import shutil
|
|
|
|
| 8 |
import re
|
| 9 |
from datetime import datetime
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
# Fonction pour afficher la documentation directement dans l'interface
|
| 12 |
def afficher_doc():
|
| 13 |
return """
|
|
|
|
| 164 |
# Fonction pour afficher la documentation lorsque le bouton est cliqué
|
| 165 |
btn_doc.click(
|
| 166 |
fn=afficher_doc,
|
| 167 |
+
inputs=[], # Liste vide car la fonction n'a pas besoin d'entrées
|
| 168 |
outputs=output_doc
|
| 169 |
)
|
| 170 |
|
|
|
|
| 185 |
)
|
| 186 |
|
| 187 |
demo.launch(share=True)
|
|
|