Update app.py
Browse files
app.py
CHANGED
@@ -110,12 +110,10 @@ class ModelManager:
|
|
110 |
async with self.index_lock:
|
111 |
part_name = f"part_{part_index}"
|
112 |
print(f"Indexando parte {part_index}")
|
113 |
-
llama_part = Llama(model_part)
|
114 |
self.model_parts[part_name] = llama_part
|
115 |
-
print(f"Parte {part_index} indexada")
|
116 |
|
117 |
async def generate_response(self, user_input):
|
118 |
-
print("Generando respuestas")
|
119 |
tasks = [self.generate_chat_response(user_input, model_data) for model_data in self.models.values()]
|
120 |
responses = await asyncio.gather(*tasks)
|
121 |
return responses
|
|
|
110 |
async with self.index_lock:
|
111 |
part_name = f"part_{part_index}"
|
112 |
print(f"Indexando parte {part_index}")
|
113 |
+
llama_part = Llama.from_bytes(model_part.getvalue()) # Ajusta según la biblioteca y clase correctas
|
114 |
self.model_parts[part_name] = llama_part
|
|
|
115 |
|
116 |
async def generate_response(self, user_input):
|
|
|
117 |
tasks = [self.generate_chat_response(user_input, model_data) for model_data in self.models.values()]
|
118 |
responses = await asyncio.gather(*tasks)
|
119 |
return responses
|