# GUI creation with AI

**URL:** <https://forum.inductiveautomation.com/t/gui-creation-with-ai/88329>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [April 4, 2024, 9:02am UTC](https://forum.inductiveautomation.com/t/gui-creation-with-ai/88329 "2024-04-04T09:02:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tjark\_Sterk](https://avatars.discourse-cdn.com/v4/letter/t/ac91a4/32.png) [@Tjark\_Sterk](https://forum.inductiveautomation.com/u/Tjark_Sterk)\
**Post date:** [April 4, 2024, 9:02am UTC](https://forum.inductiveautomation.com/t/gui-creation-with-ai/88329/1 "2024-04-04T09:02:23Z")

</div>

Hey, I just wanted to share some experiments I did after reading this post [Create Windows Vision from a script - Ignition - Inductive Automation Forum](https://forum.inductiveautomation.com/t/create-windows-vision-from-a-script/56094).   
 Based on that idea I tried feeding the xml code of a few example windows into different chatbots and prompting them to create new windows based on that.  
 While it did work better than expected with GPT4 and not only made a correct layout it even was able to assign small scripts to components. I still don't think that it is viable since the xml files tend to get rather big quickly and even with this small window I almost hit the token limit of 4000. One could probably do further testing if one has access to a model with bigger input.   
 Just wanted to share maybe someone has ideas how to improve this or maybe with better models this becomes viable.

Prompt:  
based on these examples create an xml file for a window with the size 500x500 that has two labels on the left side below each other with a spacing of 5 between them. On the right there should be a button that sets the text of both labels to a random number. make all components the size 20x50. Dont comment your code.  
(I resized the components since 20x50 is not a good size but it was correct)

 ![Test1](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/4/8498cb9c9bf6088e8c3d3e450b07cd1f5097554b.png)  
After clicking:  
 ![test2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/f/7f7174193dad84136fe9bb9428cc44fa0161b64c.png)
