Spaces:
Runtime error
Runtime error
Marcus Vinicius Zerbini Canhaço
commited on
Commit
·
75a5413
1
Parent(s):
43a30ac
feat: atualização do detector com otimizações para GPU T4
Browse files- src/main.py +3 -3
src/main.py
CHANGED
|
@@ -127,10 +127,10 @@ def main():
|
|
| 127 |
if IS_HUGGINGFACE:
|
| 128 |
# Configurar com base no tipo de GPU
|
| 129 |
if gpu_type == "t4_dedicated":
|
| 130 |
-
max_concurrent =
|
| 131 |
queue_size = 10
|
| 132 |
else:
|
| 133 |
-
max_concurrent =
|
| 134 |
queue_size = 5
|
| 135 |
|
| 136 |
# Configurar fila
|
|
@@ -138,7 +138,7 @@ def main():
|
|
| 138 |
api_open=False,
|
| 139 |
max_size=queue_size,
|
| 140 |
status_update_rate="auto",
|
| 141 |
-
|
| 142 |
)
|
| 143 |
|
| 144 |
# Launch
|
|
|
|
| 127 |
if IS_HUGGINGFACE:
|
| 128 |
# Configurar com base no tipo de GPU
|
| 129 |
if gpu_type == "t4_dedicated":
|
| 130 |
+
max_concurrent = 3 # T4 pode lidar com mais requisições
|
| 131 |
queue_size = 10
|
| 132 |
else:
|
| 133 |
+
max_concurrent = 2 # Zero-GPU precisa ser mais conservadora
|
| 134 |
queue_size = 5
|
| 135 |
|
| 136 |
# Configurar fila
|
|
|
|
| 138 |
api_open=False,
|
| 139 |
max_size=queue_size,
|
| 140 |
status_update_rate="auto",
|
| 141 |
+
default_concurrency_limit=max_concurrent
|
| 142 |
)
|
| 143 |
|
| 144 |
# Launch
|