Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def generate(image_editor, prompt, neg_prompt, versions):
|
|
52 |
|
53 |
final_dict = {'background': final_image, 'layers': None, 'composite': final_image}
|
54 |
|
55 |
-
return final_dict, image, mask, final_image,
|
56 |
|
57 |
with gr.Blocks() as demo:
|
58 |
gr.Markdown("""
|
@@ -66,9 +66,9 @@ with gr.Blocks() as demo:
|
|
66 |
prompt = gr.Textbox()
|
67 |
generate_button = gr.Button("Generate")
|
68 |
with gr.Accordion("Advanced Settings", open=False):
|
69 |
-
neg_prompt = gr.Textbox(label='Negative Prompt', value='ugly, deformed
|
70 |
with gr.Column():
|
71 |
-
version_gallery = gr.Gallery(label="Versions")
|
72 |
restore_button = gr.Button("Restore Version")
|
73 |
|
74 |
|
|
|
52 |
|
53 |
final_dict = {'background': final_image, 'layers': None, 'composite': final_image}
|
54 |
|
55 |
+
return final_dict, image, mask, final_image, versions.append(final_image)
|
56 |
|
57 |
with gr.Blocks() as demo:
|
58 |
gr.Markdown("""
|
|
|
66 |
prompt = gr.Textbox()
|
67 |
generate_button = gr.Button("Generate")
|
68 |
with gr.Accordion("Advanced Settings", open=False):
|
69 |
+
neg_prompt = gr.Textbox(label='Negative Prompt', value='ugly, deformed')
|
70 |
with gr.Column():
|
71 |
+
version_gallery = gr.Gallery(label="Versions", type="pil", object_fit='contain')
|
72 |
restore_button = gr.Button("Restore Version")
|
73 |
|
74 |
|