refactor(*): Change how model files are set

This commit is contained in:
Josh Creek
2023-09-25 21:35:41 +01:00
parent edd6819843
commit e67ef5f5e5
+2 -2
View File
@@ -1,7 +1,7 @@
import os
from stable_baselines3 import PPO
models_dir = "../../models/PPO-rl"
model_zip = "PPO-rl2/280000.zip"
class Agent:
@@ -9,7 +9,7 @@ class Agent:
# Get the directory of agent.py
script_dir = os.path.dirname(os.path.realpath(__file__))
model_path = os.path.join(script_dir, "../../models/PPO-rl/280000.zip")
model_path = os.path.join(script_dir, f"../../models/{model_zip}")
self.model = PPO.load(model_path)
def act(self, obs):