Spaces:
Running
Running
add configurable concurrency count from env. variables with default value (#23)
Browse files
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=
|
| 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)
|