Better HN
topnewbestaskshowjobs
Log inSign up

designhat

9 karma · joined Feb 12, 2023 (3y ago) · 6 submissions

Submissions

comment 3y ago · link · parent

Thanks! Generating React code seemed harder than Figma so I decided to do that first. But will most likely have Figma in the next release.

I'm not sure whether the best initial user for this kind of tool is designers or non-designers. The two startups in this space I know of (https://diagram.com/ and https://www.usegalileo.ai/) seem to think the former.

comment 3y ago · link · parent

Thanks! It's using Davinci and maxing out the token limit so it's about 8 cents per generation.

Not sure if I understand your second question. GPT-3 is outputting the props of the component, the primitive elements in the component (images, icons, text, badges), the "values" (i.e. which copy should this text field have) the primitive elements should have in terms of the props, and some sample data to set the props to.

A separate layout optimization is determining how to arrange the primitive elements.

Given all that it's possible to generate code for a react component that you can plug whatever values you want into for the props.

comment 3y ago · link · parent

Thanks for the feedback! Yep it's only trained on examples of list items and cards, most of which follow the layout you described.

It does occasionally do different layouts, here's an example: https://designhat.ai/generations/7396ec47-ad9d-4f1e-90ce-ce9...

In the future I want to make it work for more types of components than just list items and increase the set of primitive elements it has to work with. Currently it's just arranging badges, labels, icons and images.

comment 3y ago · link · parent

Sorry, looks like a memory leak built up overnight. Should be working now.

Glad you like the idea! It's a combination of GPT-3 and traditional layout optimization similar to this paper: http://www.dgp.toronto.edu/~donovan/layout/

GPT-3 is prompted to output JSON that describes which elements should be in the design (label, icon, image, badge, etc), their copy and which elements should be grouped together. Then the layout optimization module determines how those elements should be arranged spatially.

I eventually want to experiment with fine-tuning stable diffusion to handle the layout part of the problem, by outputting colored rectangles that represent the layout, like in this paper http://interactionmining.org/rico

comment 3y ago · link · parent

Yep the backend went down due to traffic. Should be fixed now!

6.

Show HN: Generate User Interface Components with GPT-3(designhat.ai ↗)

24 points · by designhat · 3y ago · 13 comments