akhaliq HF Staff commited on
Commit
49b3b0d
·
verified ·
1 Parent(s): 5b2aa57

Update app.py from anycoder

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -421,7 +421,7 @@ with open('examples/0_examples.json', 'r') as file: examples = json.load(file)
421
  print(examples)
422
 
423
  # Gradio 6 syntax - no parameters in Blocks()
424
- with gr.Blocks(css=css) as demo:
425
  with gr.Column(elem_id="col-container"):
426
  with gr.Column():
427
  # Ultra-minimalist Apple-style header
@@ -488,6 +488,13 @@ with gr.Blocks(css=css) as demo:
488
  step=1,
489
  value=25,
490
  )
 
 
 
 
 
 
 
491
  with gr.Row():
492
  width = gr.Slider(
493
  label="Width",
@@ -554,6 +561,7 @@ with gr.Blocks(css=css) as demo:
554
  if __name__ == "__main__":
555
  # Gradio 6 syntax - all launch parameters go here
556
  demo.launch(
 
557
  mcp_server=True,
558
  theme=gr.themes.Base(
559
  primary_hue="blue",
@@ -604,4 +612,4 @@ if __name__ == "__main__":
604
  footer_links=[
605
  {"label": "Built with anycoder", "url": "https://huggingface.co/spaces/akhaliq/anycoder"}
606
  ]
607
- )
 
421
  print(examples)
422
 
423
  # Gradio 6 syntax - no parameters in Blocks()
424
+ with gr.Blocks() as demo:
425
  with gr.Column(elem_id="col-container"):
426
  with gr.Column():
427
  # Ultra-minimalist Apple-style header
 
488
  step=1,
489
  value=25,
490
  )
491
+ guidance_scale = gr.Slider(
492
+ label="Guidance Scale",
493
+ minimum=1.0,
494
+ maximum=10.0,
495
+ step=0.1,
496
+ value=3.5,
497
+ )
498
  with gr.Row():
499
  width = gr.Slider(
500
  label="Width",
 
561
  if __name__ == "__main__":
562
  # Gradio 6 syntax - all launch parameters go here
563
  demo.launch(
564
+ css=css, # Moved from Blocks() to launch() - Gradio 6 syntax
565
  mcp_server=True,
566
  theme=gr.themes.Base(
567
  primary_hue="blue",
 
612
  footer_links=[
613
  {"label": "Built with anycoder", "url": "https://huggingface.co/spaces/akhaliq/anycoder"}
614
  ]
615
+ )