| import streamlit as st | |
| from pathlib import Path | |
| APP_DIR = Path(__file__).resolve().parent # src/ | |
| REPO_ROOT = APP_DIR.parent # repo root | |
| SECTIONS_DIR = REPO_ROOT / "sections" | |
| SECTIONS = { | |
| "Identify dataset": "01_identify_dataset.md", | |
| "Getting started with HuggingFace": "02_getting_started_with_hf.md", | |
| "Create dataset": "03_create_dataset.md", | |
| "Add README": "04_create_dataset_card.md", | |
| "Add metadata": "05_add_dataset_metadata.md", | |
| "Versioning": "06_versioning.md", | |
| "Practical recommendations": "07_practical_recommendations.md", | |
| "FAQ": "08_faq.md", | |
| } | |
| st.set_page_config( | |
| page_title="Molecular Dataset Curation Guide", | |
| layout="wide" | |
| ) | |
| st.sidebar.title("Dataset Curation Guide") | |
| choice = st.sidebar.radio("Navigate", list(SECTIONS.keys())) | |
| md_path = SECTIONS_DIR / SECTIONS[choice] | |
| if md_path.exists(): | |
| st.markdown(md_path.read_text(), unsafe_allow_html=True) | |
| else: | |
| st.error(f"Missing section file: {md_path}") |