diff --git a/.github/scripts/generate_datasets_table.py b/.github/scripts/generate_datasets_table.py index e0647d5..b582e38 100644 --- a/.github/scripts/generate_datasets_table.py +++ b/.github/scripts/generate_datasets_table.py @@ -10,9 +10,19 @@ table_content = df.to_markdown(index=False) with open("README.md", "r") as f: - readme_content = f.read() + readme_template = f.read() -updated_readme_content = readme_content.replace("", table_content) +start_delimiter = "" +end_delimiter = "" + +start_pos = readme_template.find(start_delimiter) +end_pos = readme_template.find(end_delimiter) + +updated_readme_content = ( + readme_template[:start_pos + len(start_delimiter)] + + "\n" + table_content + "\n" + + readme_template[end_pos:] +) with open("README.md", "w") as f: f.write(updated_readme_content)