Equityone commited on
Commit
ab1911b
·
verified ·
1 Parent(s): 235eb22

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +41 -15
app.py CHANGED
@@ -220,18 +220,30 @@ def create_interface():
220
  """)
221
 
222
  with gr.Column(elem_classes="container"):
 
 
 
 
 
 
 
 
 
 
223
  with gr.Group(elem_classes="controls-group"):
224
  gr.Markdown("### 📐 Format et Orientation")
225
  with gr.Row():
226
  format_size = gr.Dropdown(
227
  choices=["A4", "A3", "A2", "A1", "A0"],
228
  value="A4",
229
- label="Format"
 
230
  )
231
  orientation = gr.Radio(
232
  choices=["Portrait", "Paysage"],
233
  value="Portrait",
234
- label="Orientation"
 
235
  )
236
 
237
  with gr.Group(elem_classes="controls-group"):
@@ -240,75 +252,89 @@ def create_interface():
240
  style = gr.Dropdown(
241
  choices=list(ART_STYLES.keys()),
242
  value="Art Moderne",
243
- label="Style artistique"
 
244
  )
245
  layout = gr.Dropdown(
246
  choices=list(COMPOSITION_PARAMS["Layouts"].keys()),
247
  value="Centré",
248
- label="Composition"
 
249
  )
250
 
251
  with gr.Row():
252
  ambiance = gr.Dropdown(
253
  choices=list(COMPOSITION_PARAMS["Ambiances"].keys()),
254
  value="Dramatique",
255
- label="Ambiance"
 
256
  )
257
  palette = gr.Dropdown(
258
  choices=list(COMPOSITION_PARAMS["Palette"].keys()),
259
  value="Contrasté",
260
- label="Palette"
 
261
  )
262
 
263
  with gr.Group(elem_classes="controls-group"):
264
- gr.Markdown("### 📝 Contenu")
 
265
  subject = gr.Textbox(
266
  label="Description",
267
- placeholder="Décrivez votre vision..."
 
268
  )
269
  title = gr.Textbox(
270
  label="Titre",
271
- placeholder="Titre de l'affiche..."
 
272
  )
273
 
274
  with gr.Group(elem_classes="advanced-controls"):
275
- gr.Markdown("### 🎯 Ajustements Fins")
 
276
  with gr.Row():
277
  detail_level = gr.Slider(
278
  minimum=1,
279
  maximum=10,
280
  value=7,
281
  step=1,
282
- label="Niveau de Détail"
 
283
  )
284
  contrast = gr.Slider(
285
  minimum=1,
286
  maximum=10,
287
  value=5,
288
  step=1,
289
- label="Contraste"
 
290
  )
291
  saturation = gr.Slider(
292
  minimum=1,
293
  maximum=10,
294
  value=5,
295
  step=1,
296
- label="Saturation"
 
297
  )
298
 
299
  with gr.Group(elem_classes="controls-group"):
 
300
  with gr.Row():
301
  quality = gr.Slider(
302
  minimum=30,
303
  maximum=50,
304
  value=35,
305
- label="Qualité"
 
306
  )
307
  creativity = gr.Slider(
308
  minimum=5,
309
  maximum=15,
310
  value=7.5,
311
- label="Créativité"
 
312
  )
313
 
314
  with gr.Row():
 
220
  """)
221
 
222
  with gr.Column(elem_classes="container"):
223
+ # Zone d'introduction et guide
224
+ gr.Markdown("""
225
+ ### 🎯 Guide d'utilisation
226
+ 1. Choisissez le format et l'orientation de votre affiche
227
+ 2. Sélectionnez un style artistique et une composition
228
+ 3. Décrivez votre vision dans "Description"
229
+ 4. Ajustez les paramètres fins selon vos besoins
230
+ 5. Cliquez sur "Générer" !
231
+ """)
232
+
233
  with gr.Group(elem_classes="controls-group"):
234
  gr.Markdown("### 📐 Format et Orientation")
235
  with gr.Row():
236
  format_size = gr.Dropdown(
237
  choices=["A4", "A3", "A2", "A1", "A0"],
238
  value="A4",
239
+ label="Format",
240
+ info="Choisissez la taille de votre affiche. A4 est le plus petit, A0 le plus grand."
241
  )
242
  orientation = gr.Radio(
243
  choices=["Portrait", "Paysage"],
244
  value="Portrait",
245
+ label="Orientation",
246
+ info="Portrait (vertical) ou Paysage (horizontal)"
247
  )
248
 
249
  with gr.Group(elem_classes="controls-group"):
 
252
  style = gr.Dropdown(
253
  choices=list(ART_STYLES.keys()),
254
  value="Art Moderne",
255
+ label="Style artistique",
256
+ info="Le style global de votre affiche. Chaque style a ses propres caractéristiques uniques."
257
  )
258
  layout = gr.Dropdown(
259
  choices=list(COMPOSITION_PARAMS["Layouts"].keys()),
260
  value="Centré",
261
+ label="Composition",
262
+ info="Comment les éléments seront organisés dans l'affiche"
263
  )
264
 
265
  with gr.Row():
266
  ambiance = gr.Dropdown(
267
  choices=list(COMPOSITION_PARAMS["Ambiances"].keys()),
268
  value="Dramatique",
269
+ label="Ambiance",
270
+ info="L'atmosphère générale de votre affiche"
271
  )
272
  palette = gr.Dropdown(
273
  choices=list(COMPOSITION_PARAMS["Palette"].keys()),
274
  value="Contrasté",
275
+ label="Palette",
276
+ info="Les types de couleurs utilisées"
277
  )
278
 
279
  with gr.Group(elem_classes="controls-group"):
280
+ gr.Markdown("""### 📝 Contenu
281
+ *Conseils pour la description : soyez précis sur ce que vous souhaitez voir dans l'affiche*""")
282
  subject = gr.Textbox(
283
  label="Description",
284
+ placeholder="Ex: Une affiche moderne pour un festival de musique, avec des instruments colorés flottant dans l'espace",
285
+ info="Décrivez en détail ce que vous souhaitez voir dans votre affiche"
286
  )
287
  title = gr.Textbox(
288
  label="Titre",
289
+ placeholder="Le titre qui apparaîtra sur l'affiche...",
290
+ info="Laissez vide si vous ne voulez pas de titre sur l'affiche"
291
  )
292
 
293
  with gr.Group(elem_classes="advanced-controls"):
294
+ gr.Markdown("""### 🎯 Ajustements Fins
295
+ *Ces paramètres permettent d'affiner le résultat final*""")
296
  with gr.Row():
297
  detail_level = gr.Slider(
298
  minimum=1,
299
  maximum=10,
300
  value=7,
301
  step=1,
302
+ label="Niveau de Détail",
303
+ info="Plus la valeur est élevée, plus l'image sera détaillée"
304
  )
305
  contrast = gr.Slider(
306
  minimum=1,
307
  maximum=10,
308
  value=5,
309
  step=1,
310
+ label="Contraste",
311
+ info="Influence l'intensité des couleurs et la différence entre les zones claires et sombres"
312
  )
313
  saturation = gr.Slider(
314
  minimum=1,
315
  maximum=10,
316
  value=5,
317
  step=1,
318
+ label="Saturation",
319
+ info="Contrôle la vivacité des couleurs"
320
  )
321
 
322
  with gr.Group(elem_classes="controls-group"):
323
+ gr.Markdown("### ⚙️ Paramètres de Génération")
324
  with gr.Row():
325
  quality = gr.Slider(
326
  minimum=30,
327
  maximum=50,
328
  value=35,
329
+ label="Qualité",
330
+ info="Influence la qualité finale de l'image. Une valeur plus élevée prend plus de temps"
331
  )
332
  creativity = gr.Slider(
333
  minimum=5,
334
  maximum=15,
335
  value=7.5,
336
+ label="Créativité",
337
+ info="Plus la valeur est élevée, plus l'IA prendra de libertés créatives"
338
  )
339
 
340
  with gr.Row():