File size: 483 Bytes
1a10c09
 
 
 
 
 
 
 
 
 
 
4013766
1a10c09
 
 
 
 
 
 
4013766
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from huggingface_hub import create_repo
import os
try:
    create_repo(f"Splend1dchan/Reddit_showerthought", repo_type="dataset", private=True)
except:
    pass
    
from huggingface_hub import HfApi
api = HfApi()
for r, ds, fs in os.walk("./"):
	for f in fs:
		print("doing", f)
		fname = os.path.join(r,f)
		api.upload_file(
		    path_or_fileobj=fname,
		    path_in_repo=fname,
		    repo_id="Splend1dchan/Reddit_showerthought",
		    repo_type="dataset",
		)
		print("done", f)