jerpint commited on
Commit
cb35787
·
unverified ·
1 Parent(s): a61504d

add configurable concurrency count from env. variables with default value (#23)

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -18,6 +18,8 @@ logging.getLogger("httpx").setLevel(logging.WARNING)
18
  logger = logging.getLogger(__name__)
19
  logging.basicConfig(level=logging.INFO)
20
 
 
 
21
  AVAILABLE_SOURCES_UI = [
22
  "Toward's AI",
23
  "HuggingFace",
@@ -191,5 +193,5 @@ with demo:
191
 
192
  chatbot.like(log_likes, completion)
193
 
194
- demo.queue(concurrency_count=16)
195
  demo.launch(debug=True, share=False)
 
18
  logger = logging.getLogger(__name__)
19
  logging.basicConfig(level=logging.INFO)
20
 
21
+ CONCURRENCY_COUNT = int(os.getenv("CONCURRENCY_COUNT", 64))
22
+
23
  AVAILABLE_SOURCES_UI = [
24
  "Toward's AI",
25
  "HuggingFace",
 
193
 
194
  chatbot.like(log_likes, completion)
195
 
196
+ demo.queue(concurrency_count=CONCURRENCY_COUNT)
197
  demo.launch(debug=True, share=False)