# **Deep Q-Learning** Agent playing **CartPole-v1**
This is a trained model of a **Deep Q-Learning** agent playing **CartPole-v1**.
## Usage
```python
from huggingface_hub import hf_hub_download
import torch
from dqn_model import DQN
model_path = hf_hub_download(repo_id="figurek1m/dqn-cartpole", filename="dqn_cartpole.pth")
q_network = DQN(input_dim=4, output_dim=2)
q_network.load_state_dict(torch.load(model_path))
q_network.eval()
env = gym.make("CartPole-v1")
```
Evaluation results
- mean_reward on CartPole-v1self-reported500.00 +/- 0.00