license:apache-2.0 region:us
---
title: GenSim
emoji: 📈
colorFrom: purple
colorTo: indigo
sdk: gradio
sdk_version: 3.3.1
app_file: app.py
pinned: false
license: apache-2.0
---

# Generative Simulation Interactive Demo

This demo is from the paper:

<!-- [Code as Policies: Language Model Programs for Embodied Control](https://code-as-policies.github.io/)
 -->
Below is an interactive demo for the simulated tabletop manipulation domain, seen in the paper section IV.D

## Preparations
1. Obtain an [OpenAI API Key](https://openai.com/blog/openai-api/)

## Usage 
1. Type in desired task name in the box. Then GenSim will try to run through the pipeline
2. The task name has the form word separated by dash. For instance, 'place-blue-in-yellow' and 'align-rainbow-along-line'.

## Known Limitations
1. The code generation can fail or generate infeasible tasks. 
2. The low-level pick place primitive does not do collision checking and cannot pick up certain objects.
3. Top-down generation is typically more challenging if the task name is too vague or too distant from motions such as stacking.

## Acknowledgement
Thanks to Jacky's [code-as-policies](https://huggingface.co/spaces/jackyliang42/code-as-policies/tree/main) demo.