| 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) | |