alx-d commited on
Commit
ca688cb
·
verified ·
1 Parent(s): 71ab05d

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. advanced_rag.py +6 -2
advanced_rag.py CHANGED
@@ -571,13 +571,16 @@ The response displays the model used, word count, and current context (with conv
571
  load_button.click(
572
  load_pdfs_updated,
573
  inputs=[pdf_input, model_dropdown, prompt_input, bm25_weight_slider, temperature_slider, top_p_slider],
574
- outputs=[response_output, context_output, model_output]
 
 
575
  )
576
 
577
  submit_button.click(
578
  submit_query_updated,
579
  inputs=[query_input],
580
- outputs=[response_output, context_output, input_tokens, output_tokens]
 
581
  )
582
 
583
  reset_button.click(
@@ -594,4 +597,5 @@ The response displays the model used, word count, and current context (with conv
594
 
595
  if __name__ == "__main__":
596
  debug_print("Launching Gradio interface.")
 
597
  app.launch(share=False)
 
571
  load_button.click(
572
  load_pdfs_updated,
573
  inputs=[pdf_input, model_dropdown, prompt_input, bm25_weight_slider, temperature_slider, top_p_slider],
574
+ outputs=[response_output, context_output, model_output],
575
+ concurrency_id="shared_queue"
576
+
577
  )
578
 
579
  submit_button.click(
580
  submit_query_updated,
581
  inputs=[query_input],
582
+ outputs=[response_output, context_output, input_tokens, output_tokens],
583
+ concurrency_id="shared_queue"
584
  )
585
 
586
  reset_button.click(
 
597
 
598
  if __name__ == "__main__":
599
  debug_print("Launching Gradio interface.")
600
+ app.queue(concurrency_limit=3) # Allow up to 3 concurrent executions
601
  app.launch(share=False)