File size: 787 Bytes
eff14fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use axum::{response::Json, http::StatusCode};
use serde_json::json;

pub async fn trigger_tune() -> Result<Json<serde_json::Value>, (StatusCode, String)> {
    Ok(Json(json!({
        "status": "LoRA fine-tuning job submitted on AMD MI300X",
        "job_id": "lora-med-2025-001",
        "security_note": "Training data is fully redacted. No PHI leaves the gateway."
    })))
}

pub async fn latest_round() -> Result<Json<serde_json::Value>, (StatusCode, String)> {
    Ok(Json(json!({
        "round": 3,
        "accuracy": 0.89,
        "hospitals": [
            {"name": "General Hospital A", "models_contributed": 1},
            {"name": "Regional Medical Center", "models_contributed": 1},
            {"name": "University Clinic", "models_contributed": 1}
        ]
    })))
}