ar0551 commited on
Commit
608948e
·
verified ·
1 Parent(s): 0494ac8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -79,7 +79,7 @@ def generate_prompt(prompt, strength, guidance):
79
  strength=strength
80
  ).images[0]
81
 
82
- return result
83
 
84
 
85
  # 🖥️ Gradio UI
@@ -97,9 +97,10 @@ with gr.Blocks() as demo:
97
  strength = gr.Slider(0.1, 1.0, value=0.7, label="Denoising Strength")
98
  guidance = gr.Slider(1, 20, value=7.5, label="Guidance Scale (Creativity)")
99
  controlnet_conditioning_scale = gr.Slider(0, 1, value=0.5, step=0.01, label="ControlNet Conditioning Scale")
100
-
101
- generate_img_button = gr.Button("Generate from Image")
102
- generate_prompt_button = gr.Button("Generate from Prompt")
 
103
 
104
 
105
  with gr.Column():
@@ -116,7 +117,7 @@ with gr.Blocks() as demo:
116
  generate_prompt_button.click(
117
  fn=generate_prompt,
118
  inputs=[prompt, strength, guidance],
119
- outputs=[result_output]
120
  )
121
 
122
  # 🚀 Launch the app
 
79
  strength=strength
80
  ).images[0]
81
 
82
+ return None, result
83
 
84
 
85
  # 🖥️ Gradio UI
 
97
  strength = gr.Slider(0.1, 1.0, value=0.7, label="Denoising Strength")
98
  guidance = gr.Slider(1, 20, value=7.5, label="Guidance Scale (Creativity)")
99
  controlnet_conditioning_scale = gr.Slider(0, 1, value=0.5, step=0.01, label="ControlNet Conditioning Scale")
100
+
101
+ with gr.Row():
102
+ generate_img_button = gr.Button("Generate from Image")
103
+ generate_prompt_button = gr.Button("Generate from Prompt")
104
 
105
 
106
  with gr.Column():
 
117
  generate_prompt_button.click(
118
  fn=generate_prompt,
119
  inputs=[prompt, strength, guidance],
120
+ outputs=[edge_output, result_output]
121
  )
122
 
123
  # 🚀 Launch the app