Destiny0621 commited on
Commit
d648121
1 Parent(s): 4868d89

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -4
README.md CHANGED
@@ -26,12 +26,38 @@ This is a trained model of a **A2C** agent playing **PandaReachDense-v3**
26
  using the [stable-baselines3 library](https://github.com/DLR-RM/stable-baselines3).
27
 
28
  ## Usage (with Stable-baselines3)
29
- TODO: Add your code
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  ```python
33
- from stable_baselines3 import ...
34
- from huggingface_sb3 import load_from_hub
35
 
36
- ...
 
37
  ```
 
 
 
 
 
 
 
 
 
 
 
26
  using the [stable-baselines3 library](https://github.com/DLR-RM/stable-baselines3).
27
 
28
  ## Usage (with Stable-baselines3)
 
29
 
30
+ ```python
31
+ import os
32
+
33
+ import gymnasium as gym
34
+ import panda_gym
35
+
36
+ from huggingface_sb3 import load_from_hub, package_to_hub
37
+
38
+ from stable_baselines3 import A2C
39
+ from stable_baselines3.common.evaluation import evaluate_policy
40
+ from stable_baselines3.common.vec_env import DummyVecEnv, VecNormalize
41
+ from stable_baselines3.common.env_util import make_vec_env
42
+
43
+ from huggingface_hub import notebook_login
44
+ ```
45
+
46
+ **Environment**
47
 
48
  ```python
49
+ env_id = "PandaReachDense-v3"
 
50
 
51
+ # Create the env
52
+ env = gym.make(env_id)
53
  ```
54
+
55
+ **Model**
56
+
57
+ ```python
58
+ model = A2C(policy = "MultiInputPolicy",
59
+ env = env,
60
+ learning_rate = 0.0001,
61
+ n_steps = 10,
62
+ verbose=1)
63
+ ```