Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ class ModelManager:
|
|
49 |
return self.models
|
50 |
|
51 |
print("Iniciando carga de modelos...")
|
52 |
-
with ThreadPoolExecutor(
|
53 |
futures = [executor.submit(self.load_model, config) for config in model_configs]
|
54 |
models = []
|
55 |
for future in tqdm(as_completed(futures), total=len(model_configs), desc="Cargando modelos", unit="modelo"):
|
@@ -156,7 +156,7 @@ async def generate_chat(request: ChatRequest):
|
|
156 |
responses = []
|
157 |
num_models = len(global_data['models'])
|
158 |
|
159 |
-
with ThreadPoolExecutor(
|
160 |
futures = [executor.submit(worker_function, model_data, request) for model_data in global_data['models']]
|
161 |
for future in tqdm(as_completed(futures), total=num_models, desc="Generando respuestas", unit="modelo"):
|
162 |
try:
|
|
|
49 |
return self.models
|
50 |
|
51 |
print("Iniciando carga de modelos...")
|
52 |
+
with ThreadPoolExecutor() as executor: # No hay límite de trabajadores
|
53 |
futures = [executor.submit(self.load_model, config) for config in model_configs]
|
54 |
models = []
|
55 |
for future in tqdm(as_completed(futures), total=len(model_configs), desc="Cargando modelos", unit="modelo"):
|
|
|
156 |
responses = []
|
157 |
num_models = len(global_data['models'])
|
158 |
|
159 |
+
with ThreadPoolExecutor() as executor: # No se establece límite de concurrencia
|
160 |
futures = [executor.submit(worker_function, model_data, request) for model_data in global_data['models']]
|
161 |
for future in tqdm(as_completed(futures), total=num_models, desc="Generando respuestas", unit="modelo"):
|
162 |
try:
|