OpenUI is an open source AI code generator. It generates UI interface according to the description, and can output HTML, CSS and other front-end code. It supports React, Svelte and other frameworks, simplifies front-end development process, reduces front-end development threshold through generative AI, improves design and coding efficiency, and promotes human-computer collaboration to become the norm in the future. It is very simple to use OpenUI. Just enter a description of the required interface in the text box to generate the corresponding UI effect map, and you can modify and add simple dynamic effects in real time through commands.
Demo address: https://openui.fly.dev/ai/new
GitHub: https://github.com/wandb/openui
Note that this project only provides front-end static html and cannot interface with back-end api, so it is more suitable for presentation page writing
OpenUI is still a primary tool at present, and its underlying is the Ollama model.
How to use:
Open the official demo website (you can also deploy it yourself), and you can see the whole page as shown below
At this time, you can enter text in the input box at the bottom to describe the page you want to generate. At this time, the effect of the first version is generated, which seems to be undesirable. Then we can continue to generate AI through the modification tool provided above.
If you want to see the code often, you can click the following area to select the style you want to generate
Local deployment method:
Local installation:
To run OpenUI locally, you need to install it in advance Ollama Available models. Install Ollama and pull an image CodeLlama Then you can continue the following operations:
Step 1: Preparation
Ensure that you have installed git and python environments
Step 2: Clone the project
git clone https://github.com/wandb/openui
Step 3: Install dependency
cd openui/backend
pip install .
Step 4: Set the API Key of your big language model
export OPENAI_API_KEY=xxx
Step 5: Start OpenUI
python -m openui
Docker support
You can also run it through the docker file/backend;
docker build . -t wandb/openui –load
docker run -p 7878:7878 -e OPENAI_API_KEY wandb/openui
visit: http://localhost:7878 That's it