CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
This is a Test Results Dashboard project (Tcid) that provides interactive visualization of AI model testing results. The project consists of two main applications:
- Gradio Dashboard (
app.py) - Python-based web dashboard using Gradio and Matplotlib - HTML Dashboard (
index.html) - Standalone HTML dashboard with Chart.js visualization
Both dashboards display test results for AI models including metrics like passed, failed, skipped, and error counts.
Architecture
Core Components
- app.py: Main Gradio application with dark theme UI, sidebar navigation, and matplotlib pie charts
- model_stats.json: JSON data file containing test results for different AI models
- index.html: Self-contained HTML dashboard with device-specific performance comparison (NVIDIA vs AMD)
- requirements.txt: Python dependencies (currently only matplotlib>=3.8)
Data Structure
Model statistics follow this format:
{
"model_name": {
"passed": int,
"failed": int,
"skipped": int,
"error": int
}
}
The HTML dashboard extends this with device-specific data for NVIDIA and AMD performance comparisons.
Development Commands
Environment Setup
# Activate virtual environment
source venv_tci/bin/activate
# Install dependencies
pip install -r requirements.txt
Running the Applications
Gradio Dashboard:
python app.py
HTML Dashboard:
Open index.html directly in a web browser - no server required.
Python Environment
- Python 3.12.4
- Virtual environment located at
venv_tci/ - Dependencies managed via
requirements.txt
Key Implementation Details
Gradio Application (app.py)
- Uses
MODELSdictionary for hardcoded test data (lines 8-12) plot_model_stats()function generates matplotlib pie charts with dark theme- Custom CSS for dark theme styling (lines 77-133)
- Sidebar navigation with model selection buttons
- Real-time chart updates on model selection
Data Management
- Model data is currently hardcoded in
app.py - External JSON data file
model_stats.jsonexists but is not integrated - HTML dashboard has embedded JavaScript data
Styling
- Dark theme with black backgrounds (#000000)
- Custom color scheme: Green (passed), Red (failed), Orange (skipped), Purple (error)
- Responsive design with sidebar layout
Hugging Face Spaces Configuration
This project is configured as a Hugging Face Space:
- SDK: Gradio 5.38.0
- App file: app.py
- Space emoji: π
- Color theme: indigo to pink gradient