Datasets:

Languages:
English
Size Categories:
1M<n<10M
ArXiv:
Tags:
code
Synthetic
License:
File size: 5,160 Bytes
83531fd
a050083
 
 
 
0af5457
0c566a9
83531fd
a050083
 
 
 
 
 
 
 
 
 
 
 
 
 
0c566a9
0af5457
 
 
 
 
 
 
 
 
 
 
 
a050083
5dc561a
a050083
 
 
0af5457
 
 
 
4e91fd4
 
d8bcea3
83531fd
0aa7c78
 
83531fd
4e91fd4
 
0af5457
 
e447616
4e91fd4
0af5457
 
 
 
 
 
 
 
 
 
 
 
 
 
4e91fd4
 
 
bac0e7c
4e91fd4
 
 
 
 
 
 
bac0e7c
4e91fd4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0af5457
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4e91fd4
 
 
 
 
 
75df468
 
 
 
b11f817
75df468
 
 
 
 
 
 
 
 
 
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
---
language:
- en
license: cc-by-4.0
size_categories:
- 1M<n<10M
pretty_name: WebSight
dataset_info:
- config_name: v0.2
  features:
  - name: image
    dtype: image
  - name: text
    dtype: string
  - name: llm_generated_idea
    dtype: string
  splits:
  - name: train
    num_bytes: 368943620718.125
    num_examples: 1922671
  download_size: 144861710051
  dataset_size: 368943620718.125
- config_name: v0.1
  features:
  - name: image
    dtype: image
  - name: text
    dtype: string
  splits:
  - name: train
    num_bytes: 35386660486.65
    num_examples: 822987
  download_size: 31394170440
  dataset_size: 35386660486.65
configs:
- config_name: v0.2
  default: true
  data_files:
  - split: train
    path: v0.2/train-*
- config_name: v0.1
  data_files:
  - split: train
    path: data/train-*
tags:
- code
- synthetic
---
# Dataset Card for WebSight


## Dataset Description

WebSight is a large synthetic dataset containing HTML/CSS codes representing synthetically generated English websites, each accompanied by a corresponding screenshot.

This dataset serves as a valuable resource for tasks such as generating UI codes from a screenshot.

It comes in two versions:
 - v0.1: Websites are coded with HTML + CSS. They do not include real images.
 - v0.2: Websites are coded with HTML + Tailwind CSS. They do include real images.

Essentially, here are the improvements in version v0.2, compared to version v0.1:
- Websites include real images (related to the context of the website!!)
- Usage of Tailwind CSS instead of traditional CSS
- Contains 2x more examples
- Contains more tables
- Better resolution for the screenshots
- Presence of a column indicating the LLM-generated idea to create the websites

<details>
  <summary>Details for WebSight-v0.1 (HTML + CSS)</summary>

## Data Fields

An example of a sample appears as follows:
```
{
    'images': PIL.Image,
    'text': '<html>\n<style>\n{css}</style>\n{body}\n</html>',
}
```
where `css` is the CSS code, and `body` is the body of the HTML code.
In other words, the CSS code is embedded directly within the HTML code, facilitating the straightforward training of a model.

## Data Splits

There is only one split, `train`, that contains 822,987 images and codes.

## Dataset Creation

This dataset was created using [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) to generate random website ideas with the prompt
```
Generate diverse website layout ideas for different companies, each with a unique design element.
Examples include: a car company site with a left column, a webpage footer with a centered logo.
Explore variations in colors, positions, and company fields.
Don't give any explanations or recognition that you have understood the request,
just give the list of 10 ideas, with a line break between each.
```
which were then passed to [Deepseek-Coder-33b-Instruct](https://huggingface.co/deepseek-ai/deepseek-coder-33b-instruct) with the prompt
```
Create a very SIMPLE and SHORT website with the following elements: {idea}
Be creative with the design, size, position of the elements, columns, etc...
Don't give any explanation, just the content of the HTML code `index.html` starting with `<!DOCTYPE html>`,
followed by the CSS code `styles.css` starting with `/* Global Styles */`.
Write real and short sentences for the paragraphs, don't use Lorem ipsum.
When you want to display an image, don't use <img> in the HTML, always display a colored rectangle instead. 
```
Following these steps, the HTML and CSS codes were extracted from the outputs of Deepseek-Coder and formatted into the structure `'<html>\n<style>\n{css}</style>\n{body}\n</html>'`.

</details>

<details>
  <summary>Details for WebSight-v0.2 (HTML + Tailwind CSS)</summary>

## Data Fields

An example of a sample appears as follows:
```
{
    'images': PIL.Image,
    'text': '<html>\n<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">\n{body}\n</html>',
}
```
where `body` is the body of the HTML code, containing directly the Tailwind CSS code and facilitating the straightforward training of a model.

## Data Splits

There is only one split, `train`, that contains TO DO images and codes.

## Dataset Creation

TO DO.

For now, the creation of the dataset is documented in the technical report.
</details>

## Terms of Use

By using the dataset, you agree to comply with the original licenses of the source content as well as the dataset license (CC-BY-4.0). Additionally, if you use this dataset to train a Machine Learning model, you agree to disclose your use of the dataset when releasing the model or an ML application using the model.

### Licensing Information

License CC-BY-4.0.

### Citation Information

If you are using this dataset, please cite our [technical report](https://arxiv.org/abs/2403.09029)
```
@misc{laurençon2024unlocking,
      title={Unlocking the conversion of Web Screenshots into HTML Code with the WebSight Dataset}, 
      author={Hugo Laurençon and Léo Tronchon and Victor Sanh},
      year={2024},
      eprint={2403.09029},
      archivePrefix={arXiv},
      primaryClass={cs.HC}
}
```