Update dataset card with paper link, task categories and usage
#1
by
nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,8 +1,77 @@
|
|
| 1 |
---
|
| 2 |
-
task_categories:
|
| 3 |
-
- text-generation
|
| 4 |
language:
|
| 5 |
- en
|
| 6 |
size_categories:
|
| 7 |
- n<1K
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
size_categories:
|
| 5 |
- n<1K
|
| 6 |
+
task_categories:
|
| 7 |
+
- image-text-to-text
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# Interaction2Code: Benchmarking MLLM-based Interactive Webpage Code Generation from Interactive Prototyping
|
| 11 |
+
|
| 12 |
+
[**Project Page**](https://webpai.github.io/Interaction2Code/) | [**Paper**](https://huggingface.co/papers/2411.03292) | [**GitHub**](https://github.com/WebPAI/Interaction2Code)
|
| 13 |
+
|
| 14 |
+
Interaction2Code is the first systematic investigation and benchmark for Multimodal Large Language Models (MLLMs) in generating **interactive** webpages. While existing benchmarks focus on static UI-to-code tasks, Interaction2Code encompasses 127 unique webpages and 374 distinct interactions across 15 webpage types and 31 interaction categories to evaluate dynamic interaction generation.
|
| 15 |
+
|
| 16 |
+
## Dataset Structure
|
| 17 |
+
|
| 18 |
+
The full dataset contains 127 subfolders, each corresponding to a unique webpage. Each subfolder contains:
|
| 19 |
+
|
| 20 |
+
- **Interactive Prototyping Images:** Screenshots representing the webpage states (e.g., `0.png` for the initial state, `1.png` for the state after an interaction).
|
| 21 |
+
- **action.json:** A metadata file describing the interaction, including the source/destination images, tag types (e.g., button, image), and visual types (e.g., new component, color).
|
| 22 |
+
|
| 23 |
+
### Example `action.json`
|
| 24 |
+
```json
|
| 25 |
+
{
|
| 26 |
+
"link": "https://salinaka-ecommerce.web.app/shop",
|
| 27 |
+
"topic": "shop",
|
| 28 |
+
"framework": "react",
|
| 29 |
+
"1": {
|
| 30 |
+
"src": "0",
|
| 31 |
+
"dst": "1",
|
| 32 |
+
"tag type": [
|
| 33 |
+
"image",
|
| 34 |
+
"span"
|
| 35 |
+
],
|
| 36 |
+
"visual type": [
|
| 37 |
+
"new component",
|
| 38 |
+
"text",
|
| 39 |
+
"position"
|
| 40 |
+
]
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
## Sample Usage
|
| 46 |
+
|
| 47 |
+
Based on the official [GitHub repository](https://github.com/WebPAI/Interaction2Code), you can use the following snippet to generate interactive webpage code (ensure you have configured your API keys in `key.json` within the repo structure):
|
| 48 |
+
|
| 49 |
+
```python
|
| 50 |
+
# Assuming you are in the code/prompting directory of the repository
|
| 51 |
+
from generate import generate_page
|
| 52 |
+
|
| 53 |
+
# prompt_method: direct_prompt/cot_prompt/mark_prompt/critic_prompt
|
| 54 |
+
generate_page(
|
| 55 |
+
path="../../sample/",
|
| 56 |
+
web_number=1,
|
| 57 |
+
interact_number=1,
|
| 58 |
+
prompt_method="direct_prompt"
|
| 59 |
+
)
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
## Citation
|
| 63 |
+
|
| 64 |
+
If you find this benchmark or code useful, please consider citing the paper:
|
| 65 |
+
|
| 66 |
+
```bibtex
|
| 67 |
+
@INPROCEEDINGS{xiao2025interaction2code,
|
| 68 |
+
author={Xiao, Jingyu and Wan, Yuxuan and Huo, Yintong and Wang, Zixin and Xu, Xinyi and Wang, Wenxuan and Xu, Zhiyao and Wang, Yuhang and Lyu, Michael R.},
|
| 69 |
+
booktitle={2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE 2025)},
|
| 70 |
+
title={Interaction2Code: Benchmarking MLLM-based Interactive Webpage Code Generation from Interactive Prototyping},
|
| 71 |
+
year={2025},
|
| 72 |
+
volume={},
|
| 73 |
+
number={},
|
| 74 |
+
pages={241-253},
|
| 75 |
+
doi={10.1109/ASE63991.2025.00028}
|
| 76 |
+
}
|
| 77 |
+
```
|