Added the index
Browse files
CLAUDE.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CLAUDE.md
|
| 2 |
+
|
| 3 |
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
| 4 |
+
|
| 5 |
+
## Project Overview
|
| 6 |
+
|
| 7 |
+
This is a **Test Results Dashboard** project (Tcid) that provides interactive visualization of AI model testing results. The project consists of two main applications:
|
| 8 |
+
|
| 9 |
+
1. **Gradio Dashboard** (`app.py`) - Python-based web dashboard using Gradio and Matplotlib
|
| 10 |
+
2. **HTML Dashboard** (`index.html`) - Standalone HTML dashboard with Chart.js visualization
|
| 11 |
+
|
| 12 |
+
Both dashboards display test results for AI models including metrics like passed, failed, skipped, and error counts.
|
| 13 |
+
|
| 14 |
+
## Architecture
|
| 15 |
+
|
| 16 |
+
### Core Components
|
| 17 |
+
|
| 18 |
+
- **app.py**: Main Gradio application with dark theme UI, sidebar navigation, and matplotlib pie charts
|
| 19 |
+
- **model_stats.json**: JSON data file containing test results for different AI models
|
| 20 |
+
- **index.html**: Self-contained HTML dashboard with device-specific performance comparison (NVIDIA vs AMD)
|
| 21 |
+
- **requirements.txt**: Python dependencies (currently only matplotlib>=3.8)
|
| 22 |
+
|
| 23 |
+
### Data Structure
|
| 24 |
+
|
| 25 |
+
Model statistics follow this format:
|
| 26 |
+
```json
|
| 27 |
+
{
|
| 28 |
+
"model_name": {
|
| 29 |
+
"passed": int,
|
| 30 |
+
"failed": int,
|
| 31 |
+
"skipped": int,
|
| 32 |
+
"error": int
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
The HTML dashboard extends this with device-specific data for NVIDIA and AMD performance comparisons.
|
| 38 |
+
|
| 39 |
+
## Development Commands
|
| 40 |
+
|
| 41 |
+
### Environment Setup
|
| 42 |
+
```bash
|
| 43 |
+
# Activate virtual environment
|
| 44 |
+
source venv_tci/bin/activate
|
| 45 |
+
|
| 46 |
+
# Install dependencies
|
| 47 |
+
pip install -r requirements.txt
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
### Running the Applications
|
| 51 |
+
|
| 52 |
+
**Gradio Dashboard:**
|
| 53 |
+
```bash
|
| 54 |
+
python app.py
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
**HTML Dashboard:**
|
| 58 |
+
Open `index.html` directly in a web browser - no server required.
|
| 59 |
+
|
| 60 |
+
### Python Environment
|
| 61 |
+
- Python 3.12.4
|
| 62 |
+
- Virtual environment located at `venv_tci/`
|
| 63 |
+
- Dependencies managed via `requirements.txt`
|
| 64 |
+
|
| 65 |
+
## Key Implementation Details
|
| 66 |
+
|
| 67 |
+
### Gradio Application (app.py)
|
| 68 |
+
- Uses `MODELS` dictionary for hardcoded test data (lines 8-12)
|
| 69 |
+
- `plot_model_stats()` function generates matplotlib pie charts with dark theme
|
| 70 |
+
- Custom CSS for dark theme styling (lines 77-133)
|
| 71 |
+
- Sidebar navigation with model selection buttons
|
| 72 |
+
- Real-time chart updates on model selection
|
| 73 |
+
|
| 74 |
+
### Data Management
|
| 75 |
+
- Model data is currently hardcoded in `app.py`
|
| 76 |
+
- External JSON data file `model_stats.json` exists but is not integrated
|
| 77 |
+
- HTML dashboard has embedded JavaScript data
|
| 78 |
+
|
| 79 |
+
### Styling
|
| 80 |
+
- Dark theme with black backgrounds (#000000)
|
| 81 |
+
- Custom color scheme: Green (passed), Red (failed), Orange (skipped), Purple (error)
|
| 82 |
+
- Responsive design with sidebar layout
|
| 83 |
+
|
| 84 |
+
## Hugging Face Spaces Configuration
|
| 85 |
+
|
| 86 |
+
This project is configured as a Hugging Face Space:
|
| 87 |
+
- SDK: Gradio 5.38.0
|
| 88 |
+
- App file: app.py
|
| 89 |
+
- Space emoji: 👁
|
| 90 |
+
- Color theme: indigo to pink gradient
|