Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
|
| 4 |
+
SECTIONS = {
|
| 5 |
+
"Identify dataset": "01_identify_dataset.md",
|
| 6 |
+
"Getting started with HuggingFace": "02_getting_started_hf.md",
|
| 7 |
+
"Create dataset": "03_create_dataset.md",
|
| 8 |
+
"Add README": "04_readme.md",
|
| 9 |
+
"Add metadata": "05_metadata.md",
|
| 10 |
+
"Versioning": "06_versioning.md",
|
| 11 |
+
"Practical recommendations": "07_practical_recommendations.md",
|
| 12 |
+
"FAQ": "08_faq.md",
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
st.set_page_config(
|
| 16 |
+
page_title="Molecular Dataset Curation Guide",
|
| 17 |
+
layout="wide"
|
| 18 |
+
)
|
| 19 |
+
|
| 20 |
+
st.sidebar.title("📘 Dataset Curation Guide")
|
| 21 |
+
choice = st.sidebar.radio("Navigate", list(SECTIONS.keys()))
|
| 22 |
+
|
| 23 |
+
md_path = Path("sections") / SECTIONS[choice]
|
| 24 |
+
|
| 25 |
+
if md_path.exists():
|
| 26 |
+
st.markdown(md_path.read_text(), unsafe_allow_html=True)
|
| 27 |
+
else:
|
| 28 |
+
st.error(f"Missing section file: {md_path}")
|