mylesai commited on
Commit
61fa689
1 Parent(s): 6434558

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -915,6 +915,7 @@ with gr.Blocks() as block:
915
  offline_topical_map = gr.File(label='Topical Map (must be docx)', file_types=['.docx'])
916
  offline_button = gr.Button('Run AI algorithm for AI Processed Images Section')
917
  offline_upload = gr.Label(label='Uploader')
 
918
  # with gr.Row():
919
  # offline_to_zipfile_btn = gr.Button("Zipfile Upload")
920
  # offline_to_trigger_btn = gr.Button("Brandfolder Trigger")
@@ -922,9 +923,9 @@ with gr.Blocks() as block:
922
  # selection.select(fn=get_collection_names, outputs=[selection])
923
  algo_event = algorithm.click(fn=import_client_data, inputs=[selection, zipfile, topical_map, password, project_bool, ai_bool, done_num], outputs=[upload])
924
  bf_button.click(fn=bf_trigger.run_preprocess_ai, inputs=[bf_topical_map, bf_selection, section], outputs=[bf_upload])
925
- offline_button.click(fn=offline_update.run_preprocess_ai, inputs=[offline_topical_map, offline_selection], outputs=[offline_upload])
926
- stop.click(fn=None, inputs=None, outputs=None, cancels=[algo_event])
927
-
928
  # login_to_zipfile_btn.click(
929
  # fn=None,
930
  # inputs=None,
 
915
  offline_topical_map = gr.File(label='Topical Map (must be docx)', file_types=['.docx'])
916
  offline_button = gr.Button('Run AI algorithm for AI Processed Images Section')
917
  offline_upload = gr.Label(label='Uploader')
918
+ stop_offline = gr.Button("Stop Run")
919
  # with gr.Row():
920
  # offline_to_zipfile_btn = gr.Button("Zipfile Upload")
921
  # offline_to_trigger_btn = gr.Button("Brandfolder Trigger")
 
923
  # selection.select(fn=get_collection_names, outputs=[selection])
924
  algo_event = algorithm.click(fn=import_client_data, inputs=[selection, zipfile, topical_map, password, project_bool, ai_bool, done_num], outputs=[upload])
925
  bf_button.click(fn=bf_trigger.run_preprocess_ai, inputs=[bf_topical_map, bf_selection, section], outputs=[bf_upload])
926
+ offline_event = offline_button.click(fn=offline_update.run_preprocess_ai, inputs=[offline_topical_map, offline_selection], outputs=[offline_upload])
927
+ # stop.click(fn=None, inputs=None, outputs=None, cancels=[algo_event])
928
+ stop_offline.click(fn=None, inputs=None, outputs=None, cancels=[offline_event])
929
  # login_to_zipfile_btn.click(
930
  # fn=None,
931
  # inputs=None,