Update README.md
Browse files
README.md
CHANGED
|
@@ -54,7 +54,7 @@ python -m rl_zoo3.load_from_hub --algo dqn --env SpaceInvadersNoFrameskip-v4 -or
|
|
| 54 |
python -m rl_zoo3.enjoy --algo dqn --env SpaceInvadersNoFrameskip-v4 -f logs/
|
| 55 |
```
|
| 56 |
|
| 57 |
-
## Training (with the RL Zoo)
|
| 58 |
```
|
| 59 |
python -m rl_zoo3.train --algo dqn --env SpaceInvadersNoFrameskip-v4 -f logs/
|
| 60 |
# Upload the model and generate video (when possible)
|
|
@@ -90,3 +90,20 @@ OrderedDict([('batch_size', 32),
|
|
| 90 |
```python
|
| 91 |
{'render_mode': 'rgb_array'}
|
| 92 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
python -m rl_zoo3.enjoy --algo dqn --env SpaceInvadersNoFrameskip-v4 -f logs/
|
| 55 |
```
|
| 56 |
|
| 57 |
+
## Training (with the RL Zoo) 👾
|
| 58 |
```
|
| 59 |
python -m rl_zoo3.train --algo dqn --env SpaceInvadersNoFrameskip-v4 -f logs/
|
| 60 |
# Upload the model and generate video (when possible)
|
|
|
|
| 90 |
```python
|
| 91 |
{'render_mode': 'rgb_array'}
|
| 92 |
```
|
| 93 |
+
|
| 94 |
+
# Displaying the model visually 👀
|
| 95 |
+
Finally, we now have to display our model so the audience can see what we've done! To do that, first you must install the following libraries and run a virtual screen:
|
| 96 |
+
```%%capture
|
| 97 |
+
!apt install python-opengl
|
| 98 |
+
!apt install xvfb
|
| 99 |
+
!pip3 install pyvirtualdisplay
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
```
|
| 103 |
+
from pyvirtualdisplay import Display
|
| 104 |
+
|
| 105 |
+
virtual_display = Display(visible=0, size=(1400, 900))
|
| 106 |
+
virtual_display.start()
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
Once you're in your model repository page, go over to "Files and Versions" and create a new folder called "replay.mp4" and simply upload your video and BOOM the virtual display will be right there in your model card! 🖥️
|