niulx commited on
Commit
c288323
1 Parent(s): 68d570d

Update app.py

Browse files

direct return of final result

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -432,7 +432,7 @@ with gr.Blocks() as demo:
432
  tgt_index = int(tgt_index)
433
  )
434
  run_edit_text()
435
- return 0
436
 
437
  add_button.click(run_edit_text_wrapper,
438
  inputs = [num_tokens_global,
@@ -443,7 +443,7 @@ with gr.Blocks() as demo:
443
  tgt_prompt ,
444
  tgt_index
445
  ],
446
- outputs = [],queue=True,
447
  )
448
 
449
  load_button = gr.Button("Load results")
 
432
  tgt_index = int(tgt_index)
433
  )
434
  run_edit_text()
435
+ return load_pil_img()
436
 
437
  add_button.click(run_edit_text_wrapper,
438
  inputs = [num_tokens_global,
 
443
  tgt_prompt ,
444
  tgt_index
445
  ],
446
+ outputs = [canvas_text_edit],queue=True,
447
  )
448
 
449
  load_button = gr.Button("Load results")