Spaces:
VIDraft
/
Running on Zero

openfree commited on
Commit
41e0760
·
verified ·
1 Parent(s): 30a0d3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -6
app.py CHANGED
@@ -396,7 +396,7 @@ with gr.Blocks(css=CUSTOM_CSS) as demo:
396
  top_p,
397
  ],
398
  outputs=caption_output,
399
- api_name="caption",
400
  )
401
 
402
  chat_inputs = [
@@ -430,6 +430,18 @@ with gr.Blocks(css=CUSTOM_CSS) as demo:
430
  api_name=False
431
  )
432
 
 
 
 
 
 
 
 
 
 
 
 
 
433
  clear_button.click(
434
  fn=lambda: ("", [], [], []),
435
  inputs=None,
@@ -456,8 +468,4 @@ with gr.Blocks(css=CUSTOM_CSS) as demo:
456
  )
457
 
458
  if __name__ == "__main__":
459
- demo.queue(max_size=10).launch()
460
- outputs=vqa_input,
461
- queue=False,
462
- api_name=False
463
- )
 
396
  top_p,
397
  ],
398
  outputs=caption_output,
399
+ api_name="caption"
400
  )
401
 
402
  chat_inputs = [
 
430
  api_name=False
431
  )
432
 
433
+ submit_button.click(
434
+ fn=chat,
435
+ inputs=chat_inputs,
436
+ outputs=chat_outputs,
437
+ api_name="chat"
438
+ ).success(
439
+ fn=lambda: "",
440
+ outputs=vqa_input,
441
+ queue=False,
442
+ api_name=False
443
+ )
444
+
445
  clear_button.click(
446
  fn=lambda: ("", [], [], []),
447
  inputs=None,
 
468
  )
469
 
470
  if __name__ == "__main__":
471
+ demo.queue(max_size=10).launch()