Update app.py
Browse files
app.py
CHANGED
|
@@ -73,7 +73,7 @@ class ModelManager:
|
|
| 73 |
llama = Llama.load(temp_filename)
|
| 74 |
end_time = time.time()
|
| 75 |
load_duration = end_time - start_time
|
| 76 |
-
if load_duration > 0
|
| 77 |
print(f"Modelo {model_config['name']} tard贸 {load_duration:.2f} segundos en cargar, dividiendo autom谩ticamente")
|
| 78 |
await self.handle_large_model(temp_filename, model_config)
|
| 79 |
else:
|
|
@@ -164,7 +164,7 @@ async def generate(request: Request):
|
|
| 164 |
raise HTTPException(status_code=500, detail=str(e))
|
| 165 |
|
| 166 |
def start_uvicorn():
|
| 167 |
-
uvicorn.run(app, host="0.0.0.0", port=
|
| 168 |
|
| 169 |
if __name__ == "__main__":
|
| 170 |
asyncio.run(start_uvicorn())
|
|
|
|
| 73 |
llama = Llama.load(temp_filename)
|
| 74 |
end_time = time.time()
|
| 75 |
load_duration = end_time - start_time
|
| 76 |
+
if load_duration > 0:
|
| 77 |
print(f"Modelo {model_config['name']} tard贸 {load_duration:.2f} segundos en cargar, dividiendo autom谩ticamente")
|
| 78 |
await self.handle_large_model(temp_filename, model_config)
|
| 79 |
else:
|
|
|
|
| 164 |
raise HTTPException(status_code=500, detail=str(e))
|
| 165 |
|
| 166 |
def start_uvicorn():
|
| 167 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|
| 168 |
|
| 169 |
if __name__ == "__main__":
|
| 170 |
asyncio.run(start_uvicorn())
|