Reinforcement Learning
stable-baselines3
PyTorch
English
Korean
deep-reinforcement-learning
ppo
proximal-policy-optimization
cartpole-v1
gymnasium
openai-gym
classic-control
robotics
physical-ai
sim-to-real
zero-shot-transfer
domain-randomization
inverted-pendulum
optimal-control
lqr-control
control-theory
interactive-demo
Eval Results (legacy)
Instructions to use hwihwalab/cartpole-v1-ppo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- stable-baselines3
How to use hwihwalab/cartpole-v1-ppo with stable-baselines3:
from huggingface_sb3 import load_from_hub checkpoint = load_from_hub( repo_id="hwihwalab/cartpole-v1-ppo", filename="{MODEL FILENAME}.zip", ) - Notebooks
- Google Colab
- Kaggle
Hwihwa_Lab commited on
Commit ยท
5cb6909
1
Parent(s): e780fe4
fix: enforce static sdk frontmatter in spaces README during automated deploy
Browse files- deploy_to_hf.py +27 -0
deploy_to_hf.py
CHANGED
|
@@ -72,8 +72,35 @@ def deploy_spaces(api: Any, username: str, repo_name: str, token: str, current_d
|
|
| 72 |
repo_type="space",
|
| 73 |
token=token
|
| 74 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
print(f"[โ] Spaces deployment complete! Live at: https://huggingface.co/spaces/{repo_id}")
|
| 76 |
|
|
|
|
| 77 |
def deploy_models(api: Any, username: str, repo_name: str, token: str, current_dir: Path, bundle_zip: str):
|
| 78 |
repo_id = f"{username}/{repo_name}"
|
| 79 |
print(f"\n๐ [Models] Deploying to Hugging Face Model Hub: {repo_id}...")
|
|
|
|
| 72 |
repo_type="space",
|
| 73 |
token=token
|
| 74 |
)
|
| 75 |
+
|
| 76 |
+
# Always ensure Space README has sdk: static configuration
|
| 77 |
+
space_readme = """---
|
| 78 |
+
title: CartPole-v1 Physical AI Cybernetic Lab
|
| 79 |
+
emoji: ๐ช
|
| 80 |
+
colorFrom: blue
|
| 81 |
+
colorTo: indigo
|
| 82 |
+
sdk: static
|
| 83 |
+
pinned: false
|
| 84 |
+
---
|
| 85 |
+
|
| 86 |
+
# ๐ช CartPole-v1 Physical AI Interactive Cybernetic Lab
|
| 87 |
+
|
| 88 |
+
Live interactive physics simulator for PPO Neural Policy vs Classical Optimal LQR.
|
| 89 |
+
|
| 90 |
+
- ๐ค **Model Hub**: [hwihwalab/cartpole-v1-ppo](https://huggingface.co/hwihwalab/cartpole-v1-ppo)
|
| 91 |
+
- ๐ **GitHub**: [Hwihwa-Lab/cartpole-v1-ppo](https://github.com/Hwihwa-Lab/cartpole-v1-ppo)
|
| 92 |
+
"""
|
| 93 |
+
api.upload_file(
|
| 94 |
+
path_or_fileobj=space_readme.encode("utf-8"),
|
| 95 |
+
path_in_repo="README.md",
|
| 96 |
+
repo_id=repo_id,
|
| 97 |
+
repo_type="space",
|
| 98 |
+
token=token
|
| 99 |
+
)
|
| 100 |
+
|
| 101 |
print(f"[โ] Spaces deployment complete! Live at: https://huggingface.co/spaces/{repo_id}")
|
| 102 |
|
| 103 |
+
|
| 104 |
def deploy_models(api: Any, username: str, repo_name: str, token: str, current_dir: Path, bundle_zip: str):
|
| 105 |
repo_id = f"{username}/{repo_name}"
|
| 106 |
print(f"\n๐ [Models] Deploying to Hugging Face Model Hub: {repo_id}...")
|