Home

Awesome

<p align="center"> <a href=""><img src="assets/logo.jpg"" width="200px"></a> </p> <h3 align="center"> WebDesignAgent : Towards Effortless Website Creation </h3> <p align="center"> <a href="assets/README_CN.md"><img src="https://img.shields.io/badge/文档-中文版-blue.svg" alt="CN doc"></a> <a href="https://opensource.org/license/apache-2-0"><img src="https://img.shields.io/badge/Code%20License-Apache_2.0-green.svg"></a> <a href="https://github.com/DAMO-NLP-SG"><img src="https://img.shields.io/badge/Institution-DAMO-red"></a> <a><img src="https://hits.dwyl.com/DAMO-NLP-SG/WebDesignAgent.svg?style=flat-square&show=unique"></a> <a><img src="https://img.shields.io/badge/PRs-Welcome-red"></a> </p>

harry 1.webm

These websites are built based on the following materials:

黑八戒.webm

These websites are built based on the following materials:

taobao.webm

These websites are built based on the following materials:

📰 Update

😊 What is WebDesignAgent

WebDesignAgnet is an autonomous agent that can help you build a series of websites.

It supports building webpages with:

It has the following key features:

<!-- ## Demo Video ### Auto Generation [autogen_new.webm](https://github.com/DAMO-NLP-SG/WebDesignAgent/assets/109561120/5c6eee6f-2692-420b-8c3c-681de8323b86) ### Create and Refine a Page [create_and_refine.webm](https://github.com/DAMO-NLP-SG/WebDesignAgent/assets/109561120/d2d4dc62-9737-4757-a64a-4730ae048ee8) ### Create a New Page [add_new_page.webm](https://github.com/DAMO-NLP-SG/WebDesignAgent/assets/109561120/1fbea13f-dd2f-43a3-8a67-9297fcb733ff) -->

🛠️ Requirements and Installation

git clone https://github.com/DAMO-NLP-SG/WebDesignAgent.git
cd WebDesignAgent
pip install -r requirements.txt

API config

set config.yaml to use the OpenAI APIs.

web_type : "chrome" # "chrome" or "firefox" or "edge"
LLM_TYPE : "openai" # "openai" or "claude" or "glm" or "qwen"
IMG_GEN_TYPE : "dalle3" # "dalle3" or "cogview-3" or "sd3"

# LLM settings
## openai settings
is_azure : False # set to True if you are using azure api
### Azure settings
AZURE_OPENAI_ENDPOINT : ""
AZURE_OPENAI_KEY : ""
AZURE_OPENAI_API_VERSION : ""

AZURE_OPENAI_DALLE_ENDPOINT : ""
AZURE_OPENAI_DALLE_KEY : ""

### openai settings
OPENAI_API_KEY : ""
OPENAI_PROXY_URL : ""
OPENAI_BASE_URL : ""

## claude settings
CLAUDE_API_KEY : ""

## glm settings and congview settings
GLM_API_KEY : ""

## qwen settings
DASHSCOPE_API_KEY : ""

## sd3 settings
SD3_API_KEY : ""

🚀 Quick Start

We offer two modes for using WebDesignAgent: terminal-based and GUI-based. We recommend trying the GUI mode for its user-friendly interface and greater control.

1. Run in GUI

python gui.py

Then you will enter the GUI as follows: <img alt="gui" src="assets/gui.png">

Auto Generation

For a quick usage of our WebDesignAgent, please follow these steps:

  1. Config Select Mode to Web Design Mode.
  2. Config Select Model according to your APIs. In our demos, we primarily use gpt-4o.
  3. Select the website language in the Language field.
  4. Config CSS Framework to your favored style, e.g. Tailwind.
  5. Set save_file, which saves your generated websites. . Enter your request in either the website_description field for textual requests, the website_template_path field for image template requests, or both for a combined input.
  6. If you want to build your website with your local images, please indicate the image storage path local_img_storage_path for our agent to load and then click load.
  7. Click the Plan button, which will return the textual descriptions of planned websites, their contents, and their relations. You can also change these descriptions if you find them unsuitable.
  8. Click Auto Generate to generate all the above websites for you. The screenshot of your created websites will show on the right part of the GUI tool. (It may take some time for the entire website generation)
  9. Set Vision to Close can reduce the cost but will decrease the quaility.

Human Feedback

If you want to generate a website with more human control. Following steps 1-7 in Auto Generation to get the automatically generated plans. Then customize your websites with the following ways:

2. Run in terminal

python webdesign.py --save_file "saves/shopping/" --text "a shopping website"  --refine_times 2

👀 Examples

1.Alibaba DAMO

Website generated by an website template: Websites

<p align="center"> <a href=""><img src="assets/damo.png"></a> </p>

2.Shopping

Website generated by a text description: Websites

<p align="center"> <a href=""><img src="assets/shopping.png"></a> </p>

3.Game

Website generated combining both an image and a description.

<p align="center"> <a href=""><img src="assets/game.png"></a> </p>

📑 TODO lists

  1. Support more LLMs.
  2. Support local code modification.
  3. Generate supporting backend code.
  4. At present, this is still a relatively rough demo, and we really hope that you can provide feedback to help us improve it. We welcome you to raise issues to point out our shortcomings.

WeChat

If you have any questions, please join the group chat for consultation

<p align="center"> <a href=""><img src="wechat.jpg"></a> </p>