| title | BrickGPT-Demo | |
|---|---|---|
| emoji | 🧱 | |
| colorFrom | green | |
| colorTo | yellow | |
| license | mit | |
| short_description | Generate stable toy brick structures from text prompts. | |
| app_file | app.py | |
| sdk | gradio | |
| sdk_version | 5.49.1 | |
| python_version | 3.10.13 | |
| models |
|
|
| pinned | true | |
| thumbnail | https://cdn-uploads.huggingface.co/production/uploads/672403d5f328a3e6638331ee/H66Srg95-N--44lg9-4dX.png |
This subdirectory contains the code for the official BrickGPT Gradio demo.
- Llama-3.2-1B-Instruct: BrickGPT is fine-tuned from meta-llama/Llama-3.2-1B-Instruct, a gated model. Request access
to the model here. Then generate
a Hugging Face user access token and set your access token as
an environment variable:
export HF_TOKEN=<your_token>. The model will be automatically downloaded upon running the code. - Gurobi: Running stability analysis requires a Gurobi licence to use Gurobi. Academics may request a free licence from the Gurobi website here. Place the Gurobi licence file in your home directory or another recommended location.
- ImportLDraw: Rendering brick visualizations requires ImportLDraw, provided as a Git submodule. Follow these instructions to install ImportLDraw:
- Download Git LFS, then run
git lfs install. - Install Git submodules with
git submodule update --init. - Download the LDraw parts library and
extract it in your home directory:
(cd ~ && wget https://library.ldraw.org/library/updates/complete.zip && unzip complete.zip).- If you wish to put the LDraw parts library in a different directory, set the environment variable
LDRAW_LIBRARY_PATHto the path of theldrawdirectory:export LDRAW_LIBRARY_PATH=path/to/ldraw.
- If you wish to put the LDraw parts library in a different directory, set the environment variable
- Download
this background exr file
and place it in the
ImportLDraw/loadldrawsubdirectory.
- Download Git LFS, then run
Install the Python project manager uv. Then run the demo with:
uv run gradio app.py