P01yH3dr0n commited on
Commit
4107707
β€’
1 Parent(s): 91a1da9

selected index change

Browse files
Files changed (1) hide show
  1. director_tools.py +1 -1
director_tools.py CHANGED
@@ -89,7 +89,7 @@ def director_ui():
89
  tool_btn = gr.Button(value="η”Ÿζˆ", variant="primary", visible=False)
90
  dtool_stop = gr.Button(value="ε–ζΆˆ", variant="stop", visible=False)
91
  input_image.change(lambda i: gr.Button(visible=False) if i is None else gr.Button(visible=True), inputs=input_image, outputs=tool_btn)
92
- tool_btn.click(lambda: (gr.Button(visible=False), gr.Button(visible=True), gr.Gallery(selected_index=None)), inputs=None, outputs=[tool_btn, dtool_stop, output_image])
93
  dtool_gen = tool_btn.click(augment_image, inputs=[input_image, width, height, req_type, selection, factor, defry, prompt], outputs=output_image, concurrency_id="generate")
94
  dtool_stop.click(lambda: (gr.Button(visible=True), gr.Button(visible=False)), inputs=None, outputs=[tool_btn, dtool_stop], cancels=[dtool_gen])
95
  output_image.change(lambda: (gr.Button(visible=True), gr.Button(visible=False)), inputs=None, outputs=[tool_btn, dtool_stop])
 
89
  tool_btn = gr.Button(value="η”Ÿζˆ", variant="primary", visible=False)
90
  dtool_stop = gr.Button(value="ε–ζΆˆ", variant="stop", visible=False)
91
  input_image.change(lambda i: gr.Button(visible=False) if i is None else gr.Button(visible=True), inputs=input_image, outputs=tool_btn)
92
+ tool_btn.click(lambda: (gr.Button(visible=False), gr.Button(visible=True), gr.Gallery(selected_index=None), -1), inputs=None, outputs=[tool_btn, dtool_stop, output_image, selected_index])
93
  dtool_gen = tool_btn.click(augment_image, inputs=[input_image, width, height, req_type, selection, factor, defry, prompt], outputs=output_image, concurrency_id="generate")
94
  dtool_stop.click(lambda: (gr.Button(visible=True), gr.Button(visible=False)), inputs=None, outputs=[tool_btn, dtool_stop], cancels=[dtool_gen])
95
  output_image.change(lambda: (gr.Button(visible=True), gr.Button(visible=False)), inputs=None, outputs=[tool_btn, dtool_stop])