diff --git a/hf_gen/create_docs.py b/hf_gen/create_docs.py index fe48685..1c9f024 100644 --- a/hf_gen/create_docs.py +++ b/hf_gen/create_docs.py @@ -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}" diff --git a/sb2hf.py b/sb2hf.py index 96dd903..89bdfd0 100644 --- a/sb2hf.py +++ b/sb2hf.py @@ -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, ) @@ -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',