Skip to content

Commit

Permalink
fix small things
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhultin committed Dec 2, 2024
1 parent 6ff293d commit 5bbc306
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion hf_gen/create_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def write_readme(url_reader: URLReader, metadata : dict, fp : str):
with open('hf_gen/README.md', 'r') as file:
template = Template(file.read(),trim_blocks=True)
rendered_file = template.render(**template_variables)
#output the file
hf_metadata = create_hf_metadata_yaml(metadata)
output_file = codecs.open(fp, "w", "utf-8")
readme = f"{hf_metadata}\n{rendered_file}"
Expand Down
4 changes: 2 additions & 2 deletions sb2hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def sb2hf():
create_repo(
repo_id=repo_id,
repo_type=repo_type,
private=args.hf_create_private_repo,
private= not args.hf_public,
token=args.hf_token,
exist_ok=True,
)
Expand All @@ -95,7 +95,7 @@ def sb2hf():
parser.add_argument('--hf-output-folder', help="Where to locally save the resulting HuggingFace repository.")
parser.add_argument('--push-to-hub', help="If activated, pushes generated repository directly to hub.", action='store_true', default=False)
parser.add_argument('--hf-namespace', help="Huggingface user or organization to push dataset to", default='sbx')
parser.add_argument('--hf-create-private-repo', help="Huggingface user or organization to push dataset to", default=True)
parser.add_argument('--hf-public', help="Flag if Hugging Face repository should be public", default=False)
parser.add_argument('--hf-token', help="Huggingface User Access Token to authenticate to the Hub", default=os.environ.get('HF_TOKEN', None))
parser.add_argument('--sbx-metadata-api', help="API back-end to fetch information about SBX resources", default="https://ws.spraakbanken.gu.se/ws")
parser.add_argument('--upload-data',
Expand Down

0 comments on commit 5bbc306

Please sign in to comment.