Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -267,13 +267,10 @@ with gr.Blocks() as demo:
|
|
267 |
run_optimization()
|
268 |
print('finish')
|
269 |
return "Optimization finished!"
|
270 |
-
|
271 |
-
def immediate_update():
|
272 |
-
return gr.Button("Processing...", interactive=False)
|
273 |
|
274 |
-
def
|
275 |
return gr.Button("Run Optimization (Check Log for Completion).", interactive=True)
|
276 |
-
add_button.click(fn=immediate_update, inputs=[], outputs=[add_button])
|
277 |
|
278 |
add_button.click(run_optimization_wrapper,
|
279 |
inputs = [
|
@@ -287,7 +284,7 @@ with gr.Blocks() as demo:
|
|
287 |
gradient_accumulation_steps
|
288 |
],
|
289 |
outputs = [result_info], api_name=False, concurrency_limit=45)
|
290 |
-
add_button.click(fn=
|
291 |
#add_button.update()
|
292 |
def change_text():
|
293 |
return gr.Textbox("Optimization Finished!", interactive = False)
|
@@ -356,11 +353,7 @@ with gr.Blocks() as demo:
|
|
356 |
inputs=[slider],
|
357 |
outputs=[slider2]
|
358 |
)
|
359 |
-
|
360 |
-
lambda x: x,
|
361 |
-
inputs=[slider2],
|
362 |
-
outputs=[slider]
|
363 |
-
)
|
364 |
text_button.click(load_image_ui, [false] ,
|
365 |
[image_loaded, segmentation, mask_np_list, mask_label_list, canvas, slider, slider2] )
|
366 |
|
|
|
267 |
run_optimization()
|
268 |
print('finish')
|
269 |
return "Optimization finished!"
|
270 |
+
|
|
|
|
|
271 |
|
272 |
+
def immediate_update():
|
273 |
return gr.Button("Run Optimization (Check Log for Completion).", interactive=True)
|
|
|
274 |
|
275 |
add_button.click(run_optimization_wrapper,
|
276 |
inputs = [
|
|
|
284 |
gradient_accumulation_steps
|
285 |
],
|
286 |
outputs = [result_info], api_name=False, concurrency_limit=45)
|
287 |
+
add_button.click(fn=immediate_update, inputs=[], outputs=[add_button])
|
288 |
#add_button.update()
|
289 |
def change_text():
|
290 |
return gr.Textbox("Optimization Finished!", interactive = False)
|
|
|
353 |
inputs=[slider],
|
354 |
outputs=[slider2]
|
355 |
)
|
356 |
+
|
|
|
|
|
|
|
|
|
357 |
text_button.click(load_image_ui, [false] ,
|
358 |
[image_loaded, segmentation, mask_np_list, mask_label_list, canvas, slider, slider2] )
|
359 |
|