--- title: Inference Provider Dashboard emoji: 📊 colorFrom: blue colorTo: purple sdk: docker pinned: false license: mit --- # Inference Provider Dashboard A modern web dashboard built with FastAPI that compares monthly requests between different AI inference providers by scraping data from their HuggingFace profiles. ## Features - **Real-time Data**: Scrapes monthly request statistics from HuggingFace profiles - **Beautiful UI**: Modern, responsive dashboard with charts and tables - **API Endpoints**: RESTful API for accessing provider data programmatically - **Auto-refresh**: Dashboard automatically updates every 5 minutes - **Async Performance**: Uses async/await for efficient concurrent data fetching ## Screenshots The dashboard includes: - Statistics cards showing total providers, total requests, and top provider - Interactive bar chart comparing monthly requests - Detailed table with provider information and links to HuggingFace profiles ## Installation 1. **Clone or navigate to the project directory** 2. **Install dependencies**: ```bash pip install -r requirements.txt ``` ## Usage 1. **Start the FastAPI server**: ```bash python app.py ``` Or using uvicorn directly: ```bash uvicorn app:app --host 0.0.0.0 --port 8000 --reload ``` 2. **Open your browser and navigate to**: ``` http://localhost:8000 ``` 3. **API Endpoints**: - `GET /` - Dashboard web interface - `GET /api/providers` - Get all providers data - `GET /api/providers/{provider}` - Get specific provider data ## API Examples **Get all providers data**: ```bash curl http://localhost:8000/api/providers ``` **Get specific provider data**: ```bash curl http://localhost:8000/api/providers/togethercomputer ``` ## Configuration To add more providers, edit the `PROVIDERS` list in `app.py`: ```python PROVIDERS = [ "togethercomputer", "fireworks-ai", "your-new-provider", ] ``` ## Project Structure ``` inference_provider_dashboard/ ├── app.py # FastAPI application ├── templates/ │ └── dashboard.html # Web dashboard template ├── requirements.txt # Python dependencies └── README.md # This file ``` ## Dependencies - **FastAPI**: Modern web framework for building APIs - **Uvicorn**: ASGI server for running FastAPI - **Jinja2**: Template engine for HTML rendering - **aiohttp**: Async HTTP client for concurrent requests - **BeautifulSoup4**: HTML parsing for web scraping - **Requests**: HTTP library (fallback) ## Development The application uses: - Async/await for concurrent HTTP requests - Chart.js for interactive visualizations - Modern CSS with gradients and animations - Responsive design for mobile devices ## License MIT License