taesiri commited on
Commit
a32b587
1 Parent(s): e45e8a1
Files changed (2) hide show
  1. .gitattributes +20 -0
  2. app.py +9 -6
.gitattributes CHANGED
@@ -8,6 +8,7 @@
8
  *.h5 filter=lfs diff=lfs merge=lfs -text
9
  *.joblib filter=lfs diff=lfs merge=lfs -text
10
  *.lfs.* filter=lfs diff=lfs merge=lfs -text
 
11
  *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
  *.model filter=lfs diff=lfs merge=lfs -text
13
  *.msgpack filter=lfs diff=lfs merge=lfs -text
@@ -33,3 +34,22 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  *.h5 filter=lfs diff=lfs merge=lfs -text
9
  *.joblib filter=lfs diff=lfs merge=lfs -text
10
  *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
  *.mlmodel filter=lfs diff=lfs merge=lfs -text
13
  *.model filter=lfs diff=lfs merge=lfs -text
14
  *.msgpack filter=lfs diff=lfs merge=lfs -text
 
34
  *.zip filter=lfs diff=lfs merge=lfs -text
35
  *.zst filter=lfs diff=lfs merge=lfs -text
36
  *tfevents* filter=lfs diff=lfs merge=lfs -text
37
+ # Audio files - uncompressed
38
+ *.pcm filter=lfs diff=lfs merge=lfs -text
39
+ *.sam filter=lfs diff=lfs merge=lfs -text
40
+ *.raw filter=lfs diff=lfs merge=lfs -text
41
+ # Audio files - compressed
42
+ *.aac filter=lfs diff=lfs merge=lfs -text
43
+ *.flac filter=lfs diff=lfs merge=lfs -text
44
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
45
+ *.ogg filter=lfs diff=lfs merge=lfs -text
46
+ *.wav filter=lfs diff=lfs merge=lfs -text
47
+ # Image files - uncompressed
48
+ *.bmp filter=lfs diff=lfs merge=lfs -text
49
+ *.gif filter=lfs diff=lfs merge=lfs -text
50
+ *.png filter=lfs diff=lfs merge=lfs -text
51
+ *.tiff filter=lfs diff=lfs merge=lfs -text
52
+ # Image files - compressed
53
+ *.jpg filter=lfs diff=lfs merge=lfs -text
54
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
55
+ *.webp filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -18,6 +18,7 @@ from huggingface_hub import (
18
  InferenceClient,
19
  login,
20
  snapshot_download,
 
21
  )
22
  from PIL import Image
23
  from utils import string_to_image
@@ -37,12 +38,14 @@ session_token = os.environ.get("SessionToken")
37
  login(token=session_token, add_to_git_credential=True)
38
 
39
  # Using snapshot_download to handle the download and extraction
40
- snapshot_download(
41
- repo_id='XAI/PEEB-Data',
42
- repo_type='dataset',
43
- local_dir='./',
44
- cache_dir='./hf_cache'
45
- )
 
 
46
 
47
  with zipfile.ZipFile('./data.zip', 'r') as zip_ref:
48
  zip_ref.extractall("./")
 
18
  InferenceClient,
19
  login,
20
  snapshot_download,
21
+ hf_hub_download
22
  )
23
  from PIL import Image
24
  from utils import string_to_image
 
38
  login(token=session_token, add_to_git_credential=True)
39
 
40
  # Using snapshot_download to handle the download and extraction
41
+ # snapshot_download(
42
+ # repo_id='XAI/PEEB-Data',
43
+ # repo_type='dataset',
44
+ # local_dir='./',
45
+ # cache_dir='./hf_cache'
46
+ # )
47
+ zip_file_path = hf_hub_download(repo_id='XAI/PEEB-Data', repo_type='dataset', cache_dir='./hf_cache', filename="data.zip")
48
+
49
 
50
  with zipfile.ZipFile('./data.zip', 'r') as zip_ref:
51
  zip_ref.extractall("./")