Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse filesdo not use update
app.py
CHANGED
@@ -214,11 +214,11 @@ def image_change():
|
|
214 |
os.unlink(file_path)
|
215 |
elif os.path.isdir(file_path):
|
216 |
shutil.rmtree(file_path)
|
217 |
-
return gr.Button
|
218 |
|
219 |
|
220 |
def button_clickable(is_clickable):
|
221 |
-
return gr.Button
|
222 |
|
223 |
|
224 |
|
@@ -360,10 +360,10 @@ with gr.Blocks() as demo:
|
|
360 |
return "Optimization finished!"
|
361 |
|
362 |
def immediate_update():
|
363 |
-
return gr.Button
|
364 |
|
365 |
def immediate_update2():
|
366 |
-
return gr.Button
|
367 |
add_button.click(fn=immediate_update, inputs=[], outputs=[add_button])
|
368 |
|
369 |
add_button.click(run_optimization_wrapper,
|
@@ -381,7 +381,7 @@ with gr.Blocks() as demo:
|
|
381 |
add_button.click(fn=immediate_update2, inputs=[], outputs=[add_button])
|
382 |
#add_button.update()
|
383 |
def change_text():
|
384 |
-
return gr.Textbox
|
385 |
'''txt_box.change(fn=lambda x: gr.Button.update(value="Optimization Finished!", interactive=True),
|
386 |
inputs=[txt_box], outputs=[add_button])
|
387 |
def change_text2():
|
|
|
214 |
os.unlink(file_path)
|
215 |
elif os.path.isdir(file_path):
|
216 |
shutil.rmtree(file_path)
|
217 |
+
return gr.Button("1.2 Load original masks",visible = False), gr.Button("1.2 Load edited masks",visible = False), gr.Checkbox(label = "Show Segmentation",visible = False)
|
218 |
|
219 |
|
220 |
def button_clickable(is_clickable):
|
221 |
+
return gr.Button(interactive=is_clickable)
|
222 |
|
223 |
|
224 |
|
|
|
360 |
return "Optimization finished!"
|
361 |
|
362 |
def immediate_update():
|
363 |
+
return gr.Button("Processing...", interactive=False)
|
364 |
|
365 |
def immediate_update2():
|
366 |
+
return gr.Button("Run Optimization (Check Log for Completion).", interactive=True)
|
367 |
add_button.click(fn=immediate_update, inputs=[], outputs=[add_button])
|
368 |
|
369 |
add_button.click(run_optimization_wrapper,
|
|
|
381 |
add_button.click(fn=immediate_update2, inputs=[], outputs=[add_button])
|
382 |
#add_button.update()
|
383 |
def change_text():
|
384 |
+
return gr.Textbox("Optimization Finished!", interactive = False)
|
385 |
'''txt_box.change(fn=lambda x: gr.Button.update(value="Optimization Finished!", interactive=True),
|
386 |
inputs=[txt_box], outputs=[add_button])
|
387 |
def change_text2():
|