BertChristiaens commited on
Commit
9ff56a4
1 Parent(s): 161c8b5

add iput image

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -63,6 +63,7 @@ def move_image(source: Union[str, Image.Image],
63
  del st.session_state['unique_colors']
64
 
65
  st.session_state[dest] = source_image
 
66
  if rerun:
67
  st.experimental_rerun()
68
 
@@ -149,7 +150,8 @@ def make_output_image():
149
  st.write("#### Output image")
150
  st.image(output_image, width=512)
151
  if st.button("Move to input image"):
152
- move_image('output_image', 'initial_image', remove_state=True, rerun=True)
 
153
 
154
  def make_editing_canvas(canvas_color, brush, _reset_state, generation_mode, paint_mode):
155
  st.write("#### Input image")
 
63
  del st.session_state['unique_colors']
64
 
65
  st.session_state[dest] = source_image
66
+ st.session_state['dest'] = source_image
67
  if rerun:
68
  st.experimental_rerun()
69
 
 
150
  st.write("#### Output image")
151
  st.image(output_image, width=512)
152
  if st.button("Move to input image"):
153
+ move_image('output_image', 'initial_image', remove_state=False, rerun=False)
154
+ move_image('output_image', 'input_image', remove_state=True, rerun=True)
155
 
156
  def make_editing_canvas(canvas_color, brush, _reset_state, generation_mode, paint_mode):
157
  st.write("#### Input image")