Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -119,16 +119,17 @@ def create_ui():
|
|
119 |
|
120 |
with gr.Row():
|
121 |
prompt_input = gr.Textbox(label="Enter a Prompt", placeholder="Describe the image you want to generate", lines=3)
|
|
|
122 |
generate_button = gr.Button("Generate Image")
|
123 |
|
124 |
with gr.Row():
|
125 |
output_image = gr.Image(label="Generated Image")
|
126 |
|
127 |
# Link the button to the function
|
128 |
-
generate_button.click(fn=generate_image, inputs=[prompt_input,
|
129 |
|
130 |
return ui
|
131 |
|
132 |
# Run the interface
|
133 |
if __name__ == "__main__":
|
134 |
-
create_ui().launch()
|
|
|
119 |
|
120 |
with gr.Row():
|
121 |
prompt_input = gr.Textbox(label="Enter a Prompt", placeholder="Describe the image you want to generate", lines=3)
|
122 |
+
enhance_checkbox = gr.Checkbox(label="Enhance Prompt", value=True) # Checkbox for enhancing prompt
|
123 |
generate_button = gr.Button("Generate Image")
|
124 |
|
125 |
with gr.Row():
|
126 |
output_image = gr.Image(label="Generated Image")
|
127 |
|
128 |
# Link the button to the function
|
129 |
+
generate_button.click(fn=generate_image, inputs=[prompt_input, enhance_checkbox], outputs=output_image)
|
130 |
|
131 |
return ui
|
132 |
|
133 |
# Run the interface
|
134 |
if __name__ == "__main__":
|
135 |
+
create_ui().launch()
|