tonyassi commited on
Commit
10e906d
1 Parent(s): 940b814

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -51,8 +51,14 @@ def generate(image_editor, prompt, neg_prompt, versions):
51
  final_image = final_image.crop((0, 0, original_image_size[0], original_image_size[1]))
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("""
 
51
  final_image = final_image.crop((0, 0, original_image_size[0], original_image_size[1]))
52
 
53
  final_dict = {'background': final_image, 'layers': None, 'composite': final_image}
54
+
55
+ if(versions==None):
56
+ final_gallery = [final_image]
57
+ else:
58
+ final_gallery = versions
59
+ final_gallery.append(final_image)
60
 
61
+ return final_dict, image, mask, final_image, final_gallery
62
 
63
  with gr.Blocks() as demo:
64
  gr.Markdown("""