File size: 6,712 Bytes
7b80bb8 b0c1eb5 229fc53 7b80bb8 ccc13c4 7b80bb8 229fc53 7b80bb8 b0c1eb5 229fc53 b0c1eb5 229fc53 3ec5524 229fc53 3ec5524 229fc53 3ec5524 229fc53 b0c1eb5 a1ea7b4 229fc53 3ec5524 229fc53 3ec5524 a1ea7b4 229fc53 3ec5524 229fc53 3ec5524 783b10d 229fc53 3ec5524 229fc53 3ec5524 229fc53 3ec5524 229fc53 3ec5524 229fc53 3ec5524 229fc53 3ec5524 229fc53 3ec5524 229fc53 3ec5524 229fc53 3ec5524 a1ea7b4 229fc53 3ec5524 229fc53 3ec5524 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | ---
title: MediVision — Dermatology & Wound Care AI Assistant
emoji: 🩺
colorFrom: red
colorTo: gray
sdk: gradio
sdk_version: 5.29.0
app_file: app.py
pinned: true
license: mit
---
# MediVision — Dermatology & Wound Care AI Assistant
> **AMD Developer Hackathon 2026 · Track 3: Vision & Multimodal AI**
[](https://huggingface.co/spaces/lablab-ai-amd-developer-hackathon/medivision-ai-agent)
[](LICENSE)
[](https://www.amd.com/en/products/accelerators/instinct/mi300.html)
MediVision is a **multilingual** AI assistant specialized in dermatology and wound care — it analyzes skin condition images combined with patient symptom descriptions. It supports **English, Tiếng Việt, 中文, Español, Français, and 日本語** — every output (diagnosis, severity, actions, disclaimer) is delivered natively in the selected language. Inference is served by a **vLLM server running on AMD Developer Cloud** (AMD Instinct™ MI300X + ROCm), and the lightweight Gradio frontend on Hugging Face Spaces simply calls that API — no model weights are loaded in the Space itself.
---
## Live Demo
[https://huggingface.co/spaces/lablab-ai-amd-developer-hackathon/medivision-ai-agent](https://huggingface.co/spaces/lablab-ai-amd-developer-hackathon/medivision-ai-agent)
---
## Architecture
```
User Browser
│
▼
Hugging Face Space (Gradio UI — CPU, no GPU needed)
│ HTTP (OpenAI-compatible chat/completions)
▼
AMD Developer Cloud VM
└── vLLM server ← Qwen/Qwen2.5-VL-7B-Instruct
running on AMD Instinct™ MI300X + ROCm
```
The HF Space encodes any uploaded image as base64 and passes it to the vLLM
endpoint via the standard OpenAI vision message format. This keeps the Space
footprint tiny (no PyTorch, no model download) while all heavy lifting happens
on the AMD GPU server.
---
## Features
- **Multimodal Analysis** — Combines skin/wound image + freeform symptom text for richer dermatology diagnosis suggestions.
- **Multilingual** — Full support for 6 languages: English, Tiếng Việt, 中文 (Chinese), Español, Français, and 日本語 (Japanese). All output — diagnosis, severity, recommendations, and disclaimer — is rendered natively in the selected language.
- **Structured Output** — Every analysis returns:
- Diagnosis suggestion
- Severity badge: `Low` · `Medium` · `High` · `Urgent`
- Actionable recommended steps (clinical-grade language)
- Confidence score with visual progress bar
- **AMD MI300X Powered** — Inference via vLLM on AMD Instinct™ MI300X + ROCm.
- **HF Space Ready** — Minimal dependencies; no GPU required in the Space.
---
## Conditions Analyzed
| Condition | Typical Severity |
|---|---|
| Superficial Abrasions & Cuts | Low |
| Contact Dermatitis / Allergic Rash | Low – Medium |
| Atopic Eczema Flare | Medium |
| Tinea Corporis (Ringworm) | Low |
| Psoriasis Plaque | Medium |
| Partial-Thickness Burn (2nd degree) | High |
| Suspected Cellulitis / Skin Infection | Urgent |
---
## Tech Stack
| Layer | Technology |
|---|---|
| Vision Model | [Qwen/Qwen2.5-VL-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-VL-7B-Instruct) |
| Inference Runtime | **vLLM** (OpenAI-compatible API) |
| Inference Hardware | **AMD Instinct™ MI300X** (192 GB HBM3) + ROCm |
| Inference Host | AMD Developer Cloud |
| Frontend | Gradio 5.29 (Hugging Face Space — CPU) |
| Language Support | English · Tiếng Việt · 中文 · Español · Français · 日本語 |
---
## Project Structure
```
medivision-ai-agent/
├── app.py # HF Space entry point (Gradio UI)
├── requirements.txt # Minimal dependencies (no PyTorch)
├── .env.example # Environment variable reference
├── README.md # This file
├── LICENSE # MIT
├── src/
│ ├── __init__.py
│ ├── config.py # VLLM_API_URL, MODEL_NAME, MOCK_MODE, etc.
│ ├── model_loader.py # OpenAI client → vLLM (image base64 + text)
│ ├── agent.py # Legacy agent (deprecated)
│ ├── agents.py # Multi-agent pipeline (A/B comparison, triage, SOAP)
│ ├── prompts.py # System prompts for all agents
│ └── inference.py # MediVisionPipeline orchestrator
└── sample_test_images/
└── ABOUT.md
```
---
## Running Locally
### Prerequisites
- Python 3.10+
- A running vLLM server with `Qwen/Qwen2.5-VL-7B-Instruct`
(AMD Developer Cloud or any machine with an AMD/NVIDIA GPU)
### 1. Clone
```bash
git clone https://github.com/your-org/medivision-ai-agent
cd medivision-ai-agent
```
### 2. Install dependencies
```bash
pip install -r requirements.txt
```
### 3. Configure the vLLM endpoint
```bash
cp .env.example .env
# Edit .env and set VLLM_API_URL to your AMD VM address
```
Or export directly:
```bash
export VLLM_API_URL=http://<AMD_VM_IP>:8000
export MODEL_NAME=Qwen/Qwen2.5-VL-7B-Instruct
```
### 4. Launch
```bash
python app.py
```
The app is available at `http://localhost:7860`.
---
## Starting the vLLM Server (AMD Developer Cloud)
On your AMD MI300X VM with ROCm installed:
```bash
pip install vllm
vllm serve Qwen/Qwen2.5-VL-7B-Instruct \
--host 0.0.0.0 \
--port 8000 \
--dtype float16 \
--max-model-len 4096
```
The server exposes an OpenAI-compatible API at `http://<VM_IP>:8000/v1`.
---
## Environment Variables
| Variable | Default | Description |
|---|---|---|
| `VLLM_API_URL` | `http://localhost:8000` | Base URL of the vLLM server |
| `MODEL_NAME` | `Qwen/Qwen2.5-VL-7B-Instruct` | Model ID served by vLLM |
| `VLLM_API_KEY` | `not-required` | API key (if vLLM auth is enabled) |
| `MAX_NEW_TOKENS` | `512` | Max tokens to generate |
| `TEMPERATURE` | `0.2` | Sampling temperature |
> **HF Space secret:** set `VLLM_API_URL` in the Space settings → *Repository secrets* so the Gradio app can reach your AMD VM.
---
## Disclaimer
MediVision is a **demonstration prototype** built for the AMD Developer Hackathon 2026. It is intended for educational and informational purposes only. It does **not** replace professional medical advice, diagnosis, or treatment. Always consult a licensed healthcare professional for any medical concerns.
---
## License
[MIT License](LICENSE) © 2026 MediVision Team
---
*Built with ❤️ on AMD ROCm · AMD Developer Cloud · AMD Developer Hackathon 2026*
|