--- # filepath: README.md configs: - config_name: default data_files: - split: test path: data_test.parquet - split: rest path: data_rest.parquet features: root: Image page_url: string annotation: string metadata: string image_refs: - path: string image: Image svg_assets: - path: string content: string --- # Figma2Code Dataset This dataset contains preprocessed Figma design files for the task of generating UI code from Figma designs. ## Dataset Structure The dataset is divided into two splits: `test` and `rest`. Each sample in the dataset includes the following features: - `root`: The main screenshot of the UI page as a PIL Image object. - `page_url`: The original URL of the Figma page. - `annotation`: A JSON string containing manual annotations about the UI's content and description. - `metadata`: A JSON string containing the complete preprocessed Figma node tree and properties. - `image_refs`: A list of dictionaries, where each dictionary contains the relative `path` and the `image` data (as a PIL Image) for bitmap assets. - `svg_assets`: A list of dictionaries, where each dictionary contains the relative `path` and the string `content` for SVG vector assets. ## How to Use You can load the dataset using the `datasets` library: ```python from datasets import load_dataset # Load the dataset ds = load_dataset("anonymousauthor001/ds001") # Access the different splits test_split = ds["test"] rest_split = ds["rest"] # Get the first sample from the test split sample = test_split[0] print(sample.keys()) # dict_keys(['root', 'page_url', 'annotation', 'metadata', 'image_refs', 'svg_assets'])