Version 2.3:

Edited auto-update
fix_services removed brain part
__init__.py remove brain.nn if error occurs and restart pwnagotchi service

Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-09-06 10:20:43 +02:00
parent 7a7b700dad
commit 0be91b6e2f
4 changed files with 7 additions and 28 deletions

View File

@ -18,7 +18,7 @@ def load(config, agent, epoch, from_disk=True):
logging.info("[ai] bootstrapping dependencies ...")
start = time.time()
SB_BACKEND = "stable_baselines3";
SB_BACKEND = "stable_baselines3"
try:
from stable_baselines3 import A2C
@ -78,6 +78,8 @@ def load(config, agent, epoch, from_disk=True):
return a2c
except Exception as e:
logging.exception("error while starting AI (%s)", e)
logging.info("Deleting brain and restarting.")
os.system("rm /root/brain.nn && systemctl restart pwnagotchi")
logging.warning("[ai] AI not loaded!")
return False