mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user