multimodalart HF staff commited on
Commit
d42756a
1 Parent(s): 79488ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -58,11 +58,10 @@ def process_sketch(image, binary_matrixes):
58
  for n in range(how_many_colors-1):
59
  visibilities[n] = gr.update(visible=True)
60
  colors[n] = colors_fixed[n]
61
- return [gr.update(open=False), gr.update(visible=True), binary_matrixes, *visibilities, *colors]
62
 
63
  def process_generation(binary_matrixes, master_prompt, *prompts):
64
  clipped_prompts = prompts[:len(binary_matrixes)]
65
- print(clipped_prompts)
66
  #Now: master_prompt can be used as the main prompt, and binary_matrixes and clipped_prompts can be used as the masked inputs
67
  pass
68
 
@@ -113,6 +112,6 @@ with gr.Blocks(css=css) as demo:
113
  css_height = gr.HTML("<style>#main-image{width: 512px} .fixed-height{height: 512px !important}</style>")
114
 
115
  aspect.change(update_css, inputs=aspect, outputs=css_height)
116
- button_run.click(process_sketch, inputs=[image, binary_matrixes], outputs=[sketch_accordion, post_sketch, binary_matrixes, *color_row, *colors])
117
  final_run_btn.click(process_generation, inputs=[binary_matrixes, general_prompt, *prompts], outputs=out_image)
118
  demo.launch()
 
58
  for n in range(how_many_colors-1):
59
  visibilities[n] = gr.update(visible=True)
60
  colors[n] = colors_fixed[n]
61
+ return [gr.update(visible=True), binary_matrixes, *visibilities, *colors]
62
 
63
  def process_generation(binary_matrixes, master_prompt, *prompts):
64
  clipped_prompts = prompts[:len(binary_matrixes)]
 
65
  #Now: master_prompt can be used as the main prompt, and binary_matrixes and clipped_prompts can be used as the masked inputs
66
  pass
67
 
 
112
  css_height = gr.HTML("<style>#main-image{width: 512px} .fixed-height{height: 512px !important}</style>")
113
 
114
  aspect.change(update_css, inputs=aspect, outputs=css_height)
115
+ button_run.click(process_sketch, inputs=[image, binary_matrixes], outputs=[post_sketch, binary_matrixes, *color_row, *colors])
116
  final_run_btn.click(process_generation, inputs=[binary_matrixes, general_prompt, *prompts], outputs=out_image)
117
  demo.launch()