diff --git a/src/components/DatasetMetadataModal.module.css b/src/components/DatasetMetadataModal.module.css index 205ba2e..7a2388c 100644 --- a/src/components/DatasetMetadataModal.module.css +++ b/src/components/DatasetMetadataModal.module.css @@ -168,6 +168,12 @@ background: var(--agml-surface-strong); } +.linkRow { + display: flex; + flex-wrap: wrap; + gap: 0.6rem; +} + .externalLink { display: inline-flex; width: fit-content; @@ -187,6 +193,25 @@ outline: none; } +.hfLink { + display: inline-flex; + width: fit-content; + border-radius: 999px; + padding: 0.6rem 1rem; + border: 1px solid #f5a000; + background: #f5a000; + color: #fff; + text-decoration: none; + font-weight: 600; +} + +.hfLink:hover, +.hfLink:focus-visible { + background: #d98c00; + border-color: #d98c00; + outline: none; +} + :global(html[data-theme='dark']) .backdrop { background: rgba(4, 7, 5, 0.72); } diff --git a/src/components/DatasetMetadataModal.tsx b/src/components/DatasetMetadataModal.tsx index 678d9b7..d5e38ee 100644 --- a/src/components/DatasetMetadataModal.tsx +++ b/src/components/DatasetMetadataModal.tsx @@ -178,10 +178,19 @@ export function DatasetMetadataModal({
{loader.code}
- {dataset.documentation && ( - - Open source documentation - + {(dataset.documentation || dataset.hf_link) && ( +
+ {dataset.documentation && ( + + Open source documentation + + )} + {dataset.hf_link && ( + + View on Hugging Face + + )} +
)} diff --git a/src/lib/datasets.ts b/src/lib/datasets.ts index f4056ff..95ebff7 100644 --- a/src/lib/datasets.ts +++ b/src/lib/datasets.ts @@ -27,6 +27,7 @@ export interface Dataset { citation: string | null; parent_dataset?: string | null; zip_size_bytes?: number | null; + hf_link?: string | null; } type DatasetRecord = Record; @@ -140,6 +141,7 @@ function normalizeDataset(raw: unknown): Dataset | null { citation: firstString(raw.citation), parent_dataset: firstString(raw.parent_dataset, raw.parentDataset), zip_size_bytes: toNumber(raw.zip_size_bytes ?? raw.zipSizeBytes), + hf_link: firstString(raw.hf_link, raw.huggingface_link, raw.hf_url), }; } @@ -170,6 +172,7 @@ function mergeDataset(current: Dataset, incoming: Dataset): Dataset { citation: current.citation ?? incoming.citation, parent_dataset: current.parent_dataset ?? incoming.parent_dataset, zip_size_bytes: current.zip_size_bytes ?? incoming.zip_size_bytes, + hf_link: current.hf_link ?? incoming.hf_link, }; } diff --git a/src/pages/datasets/index.module.css b/src/pages/datasets/index.module.css index 499fdd2..aa0be49 100644 --- a/src/pages/datasets/index.module.css +++ b/src/pages/datasets/index.module.css @@ -526,7 +526,15 @@ html[data-theme='dark'] .dropdownOptionSelected { } html[data-theme='dark'] .chipActive { - color: #0d1410; + background: var(--agml-accent-soft); + color: var(--ifm-color-primary); + border-color: var(--agml-accent-border); +} + +html[data-theme='dark'] .activeChip { + background: var(--agml-accent-soft); + color: var(--ifm-color-primary); + border: 1px solid var(--agml-accent-border); } html[data-theme='dark'] .toggle input { diff --git a/src/pages/index.module.css b/src/pages/index.module.css index 094b2d5..d6d6393 100644 --- a/src/pages/index.module.css +++ b/src/pages/index.module.css @@ -181,6 +181,19 @@ opacity: 0.18; } +:global(html[data-theme='dark']) .primaryButton { + background: var(--agml-accent-soft); + color: var(--ifm-color-primary); + box-shadow: none; + border: 1px solid var(--agml-accent-border); +} + +:global(html[data-theme='dark']) .secondaryButton { + background: transparent; + color: var(--ifm-color-primary); + border-color: var(--agml-accent-border); +} + @media (max-width: 996px) { .hero { padding: 3.5rem 1.5rem 3rem; diff --git a/static/data/datasets.json b/static/data/datasets.json index 6c330b7..8d8e022 100644 --- a/static/data/datasets.json +++ b/static/data/datasets.json @@ -125911,7 +125911,7 @@ "agricultural_task": "None", "location": "None", "sensor_modality": "RGB", - "real_or_synthetic": "None", + "real_or_synthetic": "real", "platform": "None", "input_data_format": "jpg", "annotation_format": "coco_json", diff --git a/static/data/hf_datasets.json b/static/data/hf_datasets.json index 56c6120..f1cba2a 100644 --- a/static/data/hf_datasets.json +++ b/static/data/hf_datasets.json @@ -24,7 +24,8 @@ "citation": null, "parent_dataset": null, "zip_size_bytes": 1410000000, - "source": "huggingface" + "source": "huggingface", + "hf_link": "https://huggingface.co/datasets/Project-AgML/wGrapeUNIPD-DL_white_grape_bunch_detection" }, { "name": "Strawberry-DS_strawberry_detection", @@ -57,7 +58,8 @@ "citation": null, "parent_dataset": null, "zip_size_bytes": 293000000, - "source": "huggingface" + "source": "huggingface", + "hf_link": "https://huggingface.co/datasets/Project-AgML/Strawberry-DS_strawberry_detection" }, { "name": "synthetic_cowpea_flower_detection", @@ -85,7 +87,8 @@ "parent_dataset": null, "zip_size_bytes": 246700000, "augmented_zip_size_bytes": 6020000000, - "source": "huggingface" + "source": "huggingface", + "hf_link": "https://huggingface.co/datasets/Project-AgML/synthetic_cowpea_flower_detection" }, { "name": "synthetic_cowpea_pod_detection", @@ -113,7 +116,8 @@ "parent_dataset": null, "zip_size_bytes": 222000000, "augmented_zip_size_bytes": 5440000000, - "source": "huggingface" + "source": "huggingface", + "hf_link": "https://huggingface.co/datasets/Project-AgML/synthetic_cowpea_pod_detection" }, { "name": "GEMINI_cowpea_pod_detection", @@ -140,7 +144,8 @@ "citation": null, "parent_dataset": null, "zip_size_bytes": 45600000, - "source": "huggingface" + "source": "huggingface", + "hf_link": "https://huggingface.co/datasets/Project-AgML/GEMINI_cowpea_pod_detection" }, { "name": "GEMINI_cowpea_flower_detection", @@ -167,7 +172,8 @@ "citation": null, "parent_dataset": null, "zip_size_bytes": 79700000, - "source": "huggingface" + "source": "huggingface", + "hf_link": "https://huggingface.co/datasets/Project-AgML/GEMINI_cowpea_flower_detection" }, { "name": "cotton_leaf_disease_classification", @@ -197,6 +203,43 @@ "citation": "Ripon, Shamim; Gani , Raiyan ; Niha, Nazratan Mazumder ; Rahat, Wasimul Bari ; Toufiq, Shafaeat Hasan ; Maisha, Mushfida Ferdous ; Ahmed, Jubaer (2025), “Cotton Leaf Image Dataset for Disease Classification ”, Mendeley Data, V1, doi: 10.17632/t9hgvk2h9p.1", "zip_size_bytes": 61300000, "augmented_zip_size_bytes": 359300000, - "source": "huggingface" + "source": "huggingface", + "hf_link": "https://huggingface.co/datasets/Project-AgML/cotton_leaf_disease_classification" + }, + { + "name": "eggplant_leaf_disease_classification", + "machine_learning_task": "image_classification", + "agricultural_task": "disease_classification", + "location": "Bangladesh", + "environment": "field", + "real_or_synthetic": "real", + "crop_types": [ + "eggplant" + ], + "sensor_modality": "rgb", + "input_data_format": "image_folder", + "annotation_format": "classLabel", + "num_images": 3116, + "augmented_num_images": 10000, + "classes": [ + "Aphids", + "Cercospora Leaf Spot", + "Defect Eggplant", + "Flea Beetles", + "Fresh Eggplant", + "Fresh Eggplant Leaf", + "Leaf Wilt", + "Phytophthora Blight", + "Powdery Mildew", + "Tobacco Mosaic Virus" + ], + "examples_image_url": "/img/agml/sample_images/eggplant_leaf_disease_classification_sample.png", + "license": "cc-by-4.0", + "documentation": "https://doi.org/10.1016/j.dib.2025.112140", + "citation": "Nirob, Md Asraful Sharker; Bishshash, Prayma; Ayan, Mariyam Bin; Khatun, Tania; Uddin, Mohammad Shorif (2024), “Eggplant Dataset: A Comprehensive Dataset for Agricultural Research and Disease Detection”, Mendeley Data, V1, doi: 10.17632/5drkk544k8.1", + "zip_size_bytes": 499400000, + "augmented_zip_size_bytes": 767800000, + "source": "huggingface", + "hf_link": "https://huggingface.co/datasets/Project-AgML/eggplant_leaf_disease_classification" } -] +] \ No newline at end of file diff --git a/static/img/agml/sample_images/eggplant_leaf_disease_classification_sample.png b/static/img/agml/sample_images/eggplant_leaf_disease_classification_sample.png new file mode 100644 index 0000000..bae65e5 Binary files /dev/null and b/static/img/agml/sample_images/eggplant_leaf_disease_classification_sample.png differ