From 3db3f86b0a687c852d21af99439ff03623a11655 Mon Sep 17 00:00:00 2001 From: Christian Yemele Date: Fri, 16 Jan 2026 23:24:27 +0100 Subject: [PATCH] feat(global): platform refactor --- README.md | 3 +- inference-ui/Cargo.lock | 1 + inference-ui/Cargo.toml | 1 + inference-ui/index.html | 272 +++++++++++++++++---- inference-ui/src/app.rs | 18 +- inference-ui/src/pages/analyze.rs | 48 +++- inference-ui/src/pages/demo.rs | 93 +++++-- inference-ui/src/pages/features.rs | 125 ++++++++++ inference-ui/src/pages/home.rs | 119 ++++++++- inference-ui/src/pages/mod.rs | 1 + inference-ui/static/demo_infected.png | Bin 0 -> 538698 bytes inference-ui/static/infected.png | Bin 18451 -> 24280 bytes inference-ui/static/logo.png | Bin 0 -> 459542 bytes inference-ui/static/malaria_map_burden.png | Bin 0 -> 636439 bytes inference-ui/static/smear_illustration.png | Bin 0 -> 792876 bytes 15 files changed, 596 insertions(+), 85 deletions(-) create mode 100644 inference-ui/src/pages/features.rs create mode 100644 inference-ui/static/demo_infected.png create mode 100644 inference-ui/static/logo.png create mode 100644 inference-ui/static/malaria_map_burden.png create mode 100644 inference-ui/static/smear_illustration.png diff --git a/README.md b/README.md index 775f5aa..e724cb1 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ > **AI system for malaria detection from blood smear images** > Implemented in Rust (Burn) with an Axum inference API and a Yew web UI. +![](demo.png) ## Overview This model predicts: @@ -31,7 +32,7 @@ Stage labels are weak (image-level presence inferred from filename tokens) and a ## Requirements - Rust toolchain -- Optional (UI): `trunk` + target `wasm32-unknown-unknown` +- UI: `trunk` + target `wasm32-unknown-unknown` ## Data Preparation (Crops + Manifest) diff --git a/inference-ui/Cargo.lock b/inference-ui/Cargo.lock index d9c9410..00d2d68 100644 --- a/inference-ui/Cargo.lock +++ b/inference-ui/Cargo.lock @@ -609,6 +609,7 @@ dependencies = [ "js-sys", "log", "serde", + "serde-wasm-bindgen 0.6.5", "serde_json", "wasm-bindgen", "wasm-bindgen-futures", diff --git a/inference-ui/Cargo.toml b/inference-ui/Cargo.toml index 2950733..4102036 100644 --- a/inference-ui/Cargo.toml +++ b/inference-ui/Cargo.toml @@ -21,6 +21,7 @@ web-sys = { version = "0.3", features = [ js-sys = "0.3" serde = { version = "1", features = ["derive"] } serde_json = "1" +serde-wasm-bindgen = "0.6" log = "0.4" console_error_panic_hook = "0.1" console_log = { version = "1", features = ["color"] } diff --git a/inference-ui/index.html b/inference-ui/index.html index 599a830..c502dd7 100644 --- a/inference-ui/index.html +++ b/inference-ui/index.html @@ -1,57 +1,225 @@ - - - - Malaria Inference UI (Yew) - - - - - + - - - - -
- - - - - + } + + + + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/inference-ui/src/app.rs b/inference-ui/src/app.rs index 4e2aeaf..dfe17a9 100644 --- a/inference-ui/src/app.rs +++ b/inference-ui/src/app.rs @@ -32,6 +32,8 @@ pub enum Route { Demo, #[at("/analyze")] Analyze, + #[at("/features")] + Features, #[not_found] #[at("/404")] NotFound, @@ -42,6 +44,7 @@ fn switch(route: Route) -> Html { Route::Home => html! { }, Route::Demo => html! { }, Route::Analyze => html! { }, + Route::Features => html! { }, Route::NotFound => html! {
@@ -67,13 +70,12 @@ fn layout(props: &LayoutProps) -> Html {
-
- { html!{ - to={Route::Home} classes="text-lg font-bold tracking-tight text-bright-blue"> - { if get_locale() == "fr" { "Détection du paludisme" } else { "Malaria Detection" } } +
+ to={Route::Home} classes="flex items-center gap-2 text-lg font-bold tracking-tight text-white hover:opacity-90"> + Giemsa AI Logo + {"Giemsa AI"} > - } } -
+