Update app.py
Browse files
app.py
CHANGED
@@ -121,17 +121,43 @@ def generate_presentation(text):
|
|
121 |
return f"Présentation générée avec succès ! Vous pouvez la télécharger ici : {os.path.abspath(output_path)}"
|
122 |
|
123 |
# Interface Gradio avec une zone de texte plus grande
|
124 |
-
demo = gr.Interface(
|
125 |
-
fn=generate_presentation,
|
126 |
-
inputs=gr.Textbox(
|
127 |
-
lines=10,
|
128 |
-
label="Entrez votre texte",
|
129 |
-
max_lines=50 # Permet plus de lignes de texte
|
130 |
-
),
|
131 |
-
outputs=gr.Textbox(label="Statut"),
|
132 |
-
title="Générateur de Présentations PowerPoint",
|
133 |
-
description="Entrez votre texte et obtenez une présentation PowerPoint générée automatiquement."
|
134 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
if __name__ == "__main__":
|
137 |
demo.launch()
|
|
|
121 |
return f"Présentation générée avec succès ! Vous pouvez la télécharger ici : {os.path.abspath(output_path)}"
|
122 |
|
123 |
# Interface Gradio avec une zone de texte plus grande
|
124 |
+
#demo = gr.Interface(
|
125 |
+
# fn=generate_presentation,
|
126 |
+
# inputs=gr.Textbox(
|
127 |
+
# lines=10,
|
128 |
+
# label="Entrez votre texte",
|
129 |
+
# max_lines=50 # Permet plus de lignes de texte
|
130 |
+
# ),
|
131 |
+
# outputs=gr.Textbox(label="Statut"),
|
132 |
+
# title="Générateur de Présentations PowerPoint",
|
133 |
+
# description="Entrez votre texte et obtenez une présentation PowerPoint générée automatiquement."
|
134 |
+
#)
|
135 |
+
|
136 |
+
|
137 |
+
# Interface Gradio avec thème Sombre "gstaff/xkcd" et boîte de logs
|
138 |
+
with gr.Blocks(theme="gstaff/xkcd") as interface:
|
139 |
+
# Interface Gradio avec une zone de texte plus grande
|
140 |
+
demo = gr.Interface(
|
141 |
+
fn=generate_presentation,
|
142 |
+
inputs=gr.Textbox(
|
143 |
+
lines=10,
|
144 |
+
label="Entrez votre texte",
|
145 |
+
max_lines=50 # Permet plus de lignes de texte
|
146 |
+
),
|
147 |
+
outputs=gr.Textbox(label="Statut"),
|
148 |
+
title="Générateur de Présentations PowerPoint",
|
149 |
+
description="Entrez votre texte et obtenez une présentation PowerPoint générée automatiquement."
|
150 |
+
)
|
151 |
+
|
152 |
+
# Ajout de la boîte de logs
|
153 |
+
with gr.Row():
|
154 |
+
gr.Console()
|
155 |
+
|
156 |
+
# Lance l'interface
|
157 |
+
interface.launch()
|
158 |
+
|
159 |
+
|
160 |
+
|
161 |
|
162 |
if __name__ == "__main__":
|
163 |
demo.launch()
|