File size: 1,582 Bytes
6d7fe95
626173a
 
 
 
6d7fe95
626173a
6d7fe95
 
626173a
 
 
6d7fe95
 
626173a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
title: GLM-4.5V CAD Generator
emoji: 🔧
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: mit
hardware: zero-gpu
python_version: 3.11
---

# 🔧 GLM-4.5V CAD Generator

Generate CADQuery Python code from 3D CAD model images using GLM-4.5V vision-language models!

## Features

- **Multiple GLM-4.5V variants**: AWQ, FP8, and full precision models
- **Advanced prompting**: Simple, detailed, and chain-of-thought styles  
- **Real-time generation**: GPU-accelerated inference on Zero GPU
- **Code extraction**: Automatic cleaning and formatting of generated CADQuery code
- **Evaluation ready**: Compatible with existing VSR and IoU metrics

## Usage

1. Upload a clear 3D CAD model image
2. Select your preferred GLM-4.5V model variant
3. Choose a prompting style 
4. Click "Generate CADQuery Code"
5. Copy the generated Python code and run it locally

## Models

- **GLM-4.5V-AWQ**: Fastest startup, good quality
- **GLM-4.5V-FP8**: Balanced speed and quality
- **GLM-4.5V**: Best quality, slower startup

## Tips

- Use clear, well-lit CAD images for best results
- Simple geometric shapes work better than complex assemblies
- Try different prompt styles if first attempt isn't satisfactory
- Generated code may need minor adjustments for complex geometries

## Technical Details

This app uses Hugging Face Zero GPU for serverless GPU allocation and the latest GLM-4.5V vision-language models for image-to-code generation. The generated CADQuery code follows standard patterns with proper imports and result variables.