Yjhhh commited on
Commit
7691684
1 Parent(s): f045dea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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.5:
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=8000)
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())