ideprado commited on
Commit
a94e2a0
·
1 Parent(s): 1153025

Disable enhance for examples, cfg 6

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -285,9 +285,9 @@ with gr.Blocks(css=css, theme="ParityError/Interstellar") as demo:
285
  guidance_scale = gr.Slider(
286
  label="Guidance scale",
287
  minimum=0.0,
288
- maximum=10.0,
289
  step=0.1,
290
- value=3.5,
291
  )
292
 
293
  num_inference_steps = gr.Slider(
@@ -300,7 +300,7 @@ with gr.Blocks(css=css, theme="ParityError/Interstellar") as demo:
300
 
301
  # Examples should explicitly target only the prompt input
302
  max_length = 180
303
- gr.Examples(examples=examples, inputs=prompt, example_labels=[ex[:max_length] + "..." if len(ex) > max_length else ex for ex in examples])
304
 
305
  # Update width and height when resolution dropdown changes
306
  resolution_dropdown.change(
@@ -309,7 +309,12 @@ with gr.Blocks(css=css, theme="ParityError/Interstellar") as demo:
309
  outputs=[width, height]
310
  )
311
 
312
- # Removed separate function and gr.on for enriched prompt display update
 
 
 
 
 
313
 
314
  gr.on(
315
  triggers=[run_button.click, prompt.submit],
 
285
  guidance_scale = gr.Slider(
286
  label="Guidance scale",
287
  minimum=0.0,
288
+ maximum=15.0,
289
  step=0.1,
290
+ value=6,
291
  )
292
 
293
  num_inference_steps = gr.Slider(
 
300
 
301
  # Examples should explicitly target only the prompt input
302
  max_length = 180
303
+ examples_component = gr.Examples(examples=examples, inputs=prompt, example_labels=[ex[:max_length] + "..." if len(ex) > max_length else ex for ex in examples])
304
 
305
  # Update width and height when resolution dropdown changes
306
  resolution_dropdown.change(
 
309
  outputs=[width, height]
310
  )
311
 
312
+ # Disable enrichment when an example is clicked
313
+ examples_component.click(
314
+ fn=lambda: False,
315
+ inputs=[],
316
+ outputs=[use_prompt_enrichment]
317
+ )
318
 
319
  gr.on(
320
  triggers=[run_button.click, prompt.submit],