Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ MODEL_ID = "YoussefElsafi/PlayerAI-1.2B-v1.5"
|
|
| 15 |
|
| 16 |
# ── CPU threading (set BEFORE any torch ops) ──────────────────────────────────
|
| 17 |
PHYSICAL_CORES = os.cpu_count() or 2
|
| 18 |
-
NUM_MODEL_COPIES =
|
| 19 |
MAX_CONCURRENT = NUM_MODEL_COPIES * 2 # two requests per model at a time
|
| 20 |
THREADS_PER_GEN = max(1, PHYSICAL_CORES // NUM_MODEL_COPIES)
|
| 21 |
|
|
|
|
| 15 |
|
| 16 |
# ── CPU threading (set BEFORE any torch ops) ──────────────────────────────────
|
| 17 |
PHYSICAL_CORES = os.cpu_count() or 2
|
| 18 |
+
NUM_MODEL_COPIES = 2 # run 2 model instances in parallel
|
| 19 |
MAX_CONCURRENT = NUM_MODEL_COPIES * 2 # two requests per model at a time
|
| 20 |
THREADS_PER_GEN = max(1, PHYSICAL_CORES // NUM_MODEL_COPIES)
|
| 21 |
|