# Uploading json, jsonl files as subset on dataset repo

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuploading-json-jsonl-files-as-subset-on-dataset-repo%2F117746%3E%5C
**Category:** 🤗Datasets\
**Created:** [November 12, 2024, 10:57pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuploading-json-jsonl-files-as-subset-on-dataset-repo%2F117746 "2024-11-12T22:57:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [November 13, 2024, 2:23pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuploading-json-jsonl-files-as-subset-on-dataset-repo%2F117746%2F2 "2024-11-13T14:23:44Z")

</div>

It seems that the only way to create a subset of a dataset with a normal file is to write a script. However, this forum post is two years old, so the situation may have changed.

> [@How to create subset when pushing to hub](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-create-subset-when-pushing-to-hub%2F19542)%3A
>
> Hey! I have a dataset of image and text, and I am trying to upload it to the hub using the script below. I was wondering how to create a subset, because everything is been put in “gabrielsantosrv–pracegover” subset. Thanks in advance smiley from datasets import Dataset, load\_dataset from PIL import Image import io import json def try\_load\_image(filepath): try: with open(filepath, 'rb') as f: image = Image.open(io.BytesIO(f.read())) if isinstance(image, Image…

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuploading-json-jsonl-files-as-subset-on-dataset-repo%2F117746)._
