Spaces:
Build error
Build error
| title: MemoryBridge AAC | |
| emoji: π§ | |
| colorFrom: blue | |
| colorTo: purple | |
| sdk: gradio | |
| sdk_version: "6.14.0" | |
| python_version: "3.10" | |
| app_file: app.py | |
| pinned: false | |
| # MemoryBridge | |
| Assistive AAC communication system for people with cerebral palsy and other motor/speech disabilities. Generates personalized, contextually relevant candidate responses by fusing text retrieval (knowledge graphs + semantic search) with real-time vision signals (gestures, affect, air-sign letters). | |
| ## Architecture | |
| ``` | |
| Partner Query | |
| β | |
| βΌ | |
| βββββββββββββββββββββββββββββββββββββββββββββββ | |
| β PARALLEL EXECUTION BLOCK β | |
| β ββββββββββββββββββββ ββββββββββββββββββββ β | |
| β β TEXT PATH β β VISION PATH β β | |
| β β Intent β Router β β MediaPipe Loop β β | |
| β β KG + FAISS β β Signal Buffer β β | |
| β β Reranker β β β β | |
| β ββββββββββ¬βββββββββββ ββββββββββ¬ββββββββββ β | |
| β ββββββββββββ¬ββββββββββββ β | |
| β βΌ β | |
| β WEIGHTED FUSION LAYER β | |
| β (CoT reasoning, Qwen3-32B) β | |
| β β β | |
| β βΌ β | |
| β RESPONSE GENERATION β | |
| β 3 candidates + 1 turnaround β | |
| βββββββββββββββββββββββββββββββββββββββββββββββ | |
| ``` | |
| **Latency target**: < 5 seconds to first token. | |
| ## Quickstart | |
| ```bash | |
| # 1. Clone and install | |
| pip install -r requirements.txt | |
| # 2. Set up API keys | |
| cp .env.example .env | |
| # edit .env with your keys | |
| # 3. Build persona data (one-time) | |
| python scripts/build_persona.py --persona alex_rivera | |
| python scripts/build_kg.py --persona alex_rivera | |
| python scripts/build_faiss.py --persona alex_rivera | |
| # 4. Launch UI | |
| python -m memorybridge.ui.gradio_app | |
| # 5. Run evaluation | |
| python scripts/run_eval.py --mode S3 | |
| ``` | |
| ## Configuration | |
| All models and thresholds are configurable in `config/settings.yaml`. Swap any model (including provider) with zero code changes: | |
| ```yaml | |
| generation: | |
| provider: "anthropic" # groq | together | openai | anthropic | ollama | |
| model: "claude-sonnet-4-6-20250514" | |
| ``` | |
| ## Project Structure | |
| ``` | |
| memorybridge/ | |
| βββ config/ # settings.yaml + persona configs | |
| βββ core/ # pipeline orchestrator, model registry, schemas | |
| βββ text_path/ # intent decomposition, KG + FAISS retrieval, reranking | |
| βββ vision_path/ # gesture, affect, air-sign detection, signal buffer | |
| βββ fusion/ # weighted fusion with CoT reasoning | |
| βββ generation/ # response generation, prompt builder, style scorer | |
| βββ feedback/ # learning from user selections | |
| βββ memory/ # profile loader, KG/FAISS builders, conversation history | |
| βββ data/ # persona content, indices, knowledge graphs | |
| βββ evaluation/ # RAGAS eval, latency tracking, ablation study | |
| βββ ui/ # Gradio interface with gaze selection | |
| βββ scripts/ # build and evaluation CLI scripts | |
| ``` | |
| ## Personas | |
| - **Alex Rivera** (deep persona): 34, Buffalo NY, spastic diplegia CP, Bills fan | |
| - **Persona 2 / 3**: Shallow personas for generalizability testing | |
| ## Evaluation | |
| Three ablation conditions: | |
| - **S1** β No retrieval (baseline) | |
| - **S2** β Profile-only retrieval | |
| - **S3** β Full system (KG + FAISS + vision fusion) | |
| Metrics: RAGAS groundedness/faithfulness, E2E latency, gesture-response alignment. | |