# Difficulty accessing downloaded datasets on huggingface space

**URL:** <https://discuss.huggingface.co/t/difficulty-accessing-downloaded-datasets-on-huggingface-space/56455>\
**Category:** Beginners\
**Created:** [September 26, 2023, 2:46pm UTC](https://discuss.huggingface.co/t/difficulty-accessing-downloaded-datasets-on-huggingface-space/56455 "2023-09-26T14:46:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ridasagheer](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@ridasagheer](https://discuss.huggingface.co/u/ridasagheer)\
**Post date:** [September 26, 2023, 2:46pm UTC](https://discuss.huggingface.co/t/difficulty-accessing-downloaded-datasets-on-huggingface-space/56455/1 "2023-09-26T14:46:30Z")

</div>

Hello,

I am trying to build a gradio application on huggingface space using docker. It basically downloads a dataset from huggingface repo and then access it from cache directory. Now I am lost about how to access the dataset in cache on hugging face space.

Following the code snippet which tries to access it…

dataset = load\_dataset(“xyz/dataset”)  
json\_mapping\_dir = “/Users/xyz/.cache/huggingface/datasets/downloads”  
audio\_data\_list =   
for example in dataset[“train”][“audio”]:  
path =example[“path”]  
id = path.split(“/”)[-1]  
json\_file\_path = f"{json\_mapping\_dir}/{id}.json"

```
# Load the mapping from the JSON file
with open(json_file_path, "r") as json_file:
    mapping_data = json.load(json_file)

```

This path json\_mapping\_dir is from my local machine. How to customise it according to the docker running on huggingface space.
