--- title: Lerobot Pusht Trainer emoji: 🏆 colorFrom: indigo colorTo: pink sdk: gradio sdk_version: 5.47.2 app_file: app.py pinned: false --- # LeRobot: Diffusion-Based Policy Trainer This project demonstrates **Diffusion Policy** applied to robotics. It implements a training and inference pipeline for the **PushT** environment using Hugging Face's `lerobot` library. The goal is to train a robot agent to push a T-shaped block to a target location using generative diffusion models, which offer superior stability and multimodal action distribution compared to traditional policies. ## Features - **Diffusion Policy:** Uses Denoising Diffusion Probabilistic Models (DDPM) to generate robot action trajectories. - **PushT Environment:** A 2D simulation benchmark for precise robotic manipulation. - **Interactive UI:** A **Gradio** web interface to visualize the agent's performance in real-time. - **PyTorch Backend:** Optimized training loop using standard PyTorch and Hugging Face accelerators. ## Tech Stack - **Core:** Python, PyTorch - **Library:** Hugging Face LeRobot - **Interface:** Gradio - **Environment:** Gym / PushT ## Installation To run this locally, you need Python 3.10+ and the required dependencies. ```bash # Clone the repository git clone [https://huggingface.co/spaces/zino36/lerobot-pusht-trainer](https://huggingface.co/spaces/zino36/lerobot-pusht-trainer) cd lerobot-pusht-trainer # Install dependencies pip install -r requirements.txt Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference