A single-page web application for viewing detailed statistics of any HuggingFace user account. Displays models, datasets, spaces, lifetime downloads, monthly downloads, and likes in a clean, tree-structured interface.
- Overview
- Features
- Getting Started
- Usage
- Token Configuration
- Interface Guide
- Sorting and Filtering
- Copy and Export
- Featured Users
- Technical Details
- API Endpoints Used
- Browser Support
- Limitations
- License
- Author
HF User Stats is a lightweight, client-side tool that fetches and presents comprehensive statistics for any public (or private, with a token) HuggingFace user account. It requires no backend server, no build step, and no dependencies beyond a modern web browser. All data is fetched directly from the HuggingFace API.
- User Profile Display -- Shows user avatar, username, and full name.
- Aggregate Statistics -- Total models, datasets, and spaces at a glance.
- Lifetime Downloads -- All-time download counts for models and datasets.
- Monthly Downloads -- Downloads from the last 30 days for models and datasets.
- Likes -- Total like counts across all repository types.
- Tree View -- File-explorer-style hierarchical listing of all repositories.
- Sorting -- Sort by all-time downloads, monthly downloads, likes, or recency.
- Filtering -- Search and filter repositories by name within any tab.
- Tab Navigation -- Switch between models, datasets, and spaces views.
- Dark and Light Theme -- Toggle between themes with preference saved to local storage.
- Token Support -- Optional HuggingFace access token for private repositories and improved rate limits.
- Copy to Clipboard -- Copy individual repository IDs or the entire tree output as plain text.
- Pagination Handling -- Automatically fetches all pages of results for users with large numbers of repositories.
- Pipeline Tag Icons -- Models display context-appropriate icons based on their pipeline tag (text generation, image classification, speech recognition, and others).
- Responsive Design -- Works on desktop and mobile screens.
- No Build Required -- Single HTML file with inline CSS and JavaScript.
- Download the
index.htmlfile. - Open it in any modern web browser.
# Using Python
python -m http.server 8000
# Using Node.js
npx serve .Then navigate to http://localhost:8000 in your browser.
Upload the single HTML file to any static hosting service such as GitHub Pages, Netlify, Vercel, or Cloudflare Pages.
- Enter a HuggingFace username in the input field (for example,
prithivMLmods,TheBloke,merve). - Click Fetch Stats or press Enter.
- View the user profile, aggregate statistics, and detailed repository listings.
- Use tabs to switch between Models, Datasets, and Spaces.
- Use sort and filter controls to find specific repositories.
The username is stored in the URL hash, so you can bookmark or share links directly:
https://your-deployment.com/#prithivMLmods
A HuggingFace access token is optional but recommended for the following reasons:
- Private Repositories -- Access user repositories that are not public.
- Higher Rate Limits -- Avoid API throttling when fetching users with many repositories.
- Accurate Lifetime Stats -- Some statistics fields require authentication to return complete data.
- Click the Token button in the header.
- Paste your HuggingFace access token (starts with
hf_). - Click Save.
The token is stored in your browser's local storage. It is never sent to any server other than the HuggingFace API.
- Go to https://huggingface.co/settings/tokens.
- Create a new token with
readaccess. - Copy the token and paste it into the application.
Click the Clear button in the token panel to remove the stored token.
Displays the user avatar (circular, with accent-colored border), username (linked to the HuggingFace profile), and full name if available. The three overview cards show total counts for models, datasets, and spaces, and can be clicked to switch tabs.
Three tabs for switching between repository types:
| Tab | Description |
|---|---|
| Models | Machine learning models published by the user |
| Datasets | Datasets published by the user |
| Spaces | Gradio, Streamlit, or other interactive applications |
Shows aggregate numbers for the currently selected tab:
- Total Count -- Number of repositories of the selected type.
- Downloads (All Time) -- Cumulative downloads across all repositories (models and datasets only).
- Downloads (Last Month) -- Downloads in the last 30 days (models and datasets only).
- Total Likes -- Sum of likes across all repositories.
A terminal-style listing of all repositories with:
- Repository name (linked to HuggingFace)
- Pipeline tag icon (for models, mapped to 24 different task types)
- All-time download count
- Monthly download count
- Like count
- Last modified timestamp (relative format)
- Copy button for the repository ID
| Sort | Description |
|---|---|
| Downloads (All Time) | Highest lifetime downloads first |
| Downloads (Last Month) | Highest monthly downloads first |
| Most Liked | Highest like count first |
| Most Recent | Most recently modified first |
| Sort | Description |
|---|---|
| Most Liked | Highest like count first |
| Least Liked | Lowest like count first |
Use the search field in the filter bar to filter repositories by name. Matching text is highlighted in the tree view with an accent-colored background.
Hover over any repository in the tree view and click the copy icon to copy the full repository ID (for example, prithivMLmods/Some-Model) to your clipboard. A green checkmark confirms the copy.
Click the Copy Tree button in the tree header to copy the entire listing as formatted plain text, including aggregate statistics. The output format:
prithivMLmods -- 25 Models
|-- Model-Name-A (down-arrow 1.2M all down-arrow 234.5K /mo heart 1,234)
|-- Model-Name-B (down-arrow 890.3K all down-arrow 123.4K /mo heart 987)
L-- Model-Name-C (down-arrow 567.8K all down-arrow 89.1K /mo heart 654)
Total Downloads (All Time): 12,345,678
Total Downloads (Last Month): 1,234,567
Total Likes: 9,876
The homepage displays a curated list of featured HuggingFace users for quick access. Any valid HuggingFace username can be queried by entering it directly in the input field.
Pre-listed users include:
prithivMLmods, TheBloke, merve, MaziyarPanahi, multimodalart,
thomwolf, julien-c, lysandre, osanseviero, pcuenq, clem,
lhoestq, sayakpaul, mlabonne, mradermacher
& more !!
- Single HTML file -- No external dependencies beyond CDN-loaded fonts and icons.
- Client-side only -- All API calls are made directly from the browser to the HuggingFace API.
- No framework -- Vanilla JavaScript with direct DOM manipulation.
- Responsive CSS -- Custom properties (CSS variables) for theming with media queries for mobile layouts.
| Resource | Source |
|---|---|
| Font Awesome 6.4.0 | cdnjs.cloudflare.com |
| Inter font | Google Fonts |
| JetBrains Mono font | Google Fonts |
- User enters a username.
- Application fetches the user profile from the HuggingFace API.
- Application fetches all models, datasets, and spaces in parallel using
Promise.allSettled. - If like counts are missing from the list endpoints (all zeros), individual detail endpoints are queried in batches of 10 with concurrent requests within each batch.
- All data is stored in a client-side state object.
- The UI renders from the state object without further API calls until a new fetch is initiated.
The application maintains a single state object:
{
username: '', // Current username being viewed
profile: null, // User profile data from the API
models: [], // Array of model objects
datasets: [], // Array of dataset objects
spaces: [], // Array of space objects
activeTab: 'models', // Currently selected tab
activeFilter: 'downloads-alltime', // Current sort order
filterText: '', // Current name filter text
}| Key | Purpose |
|---|---|
hf_token |
HuggingFace access token |
hfstat_theme |
Theme preference (light or dark) |
Models display task-specific icons based on their pipeline_tag field. The following mappings are supported:
| Pipeline Tag | Icon |
|---|---|
| text-generation | Message bubble |
| text2text-generation | Language |
| text-classification | Tags |
| token-classification | Font |
| question-answering | Question circle |
| fill-mask | Mask |
| summarization | Compress |
| translation | Globe |
| conversational | Comments |
| image-classification | Image |
| object-detection | Vector square |
| image-segmentation | Puzzle piece |
| text-to-image | Magic wand |
| image-to-text | File lines |
| automatic-speech-recognition | Microphone |
| text-to-speech | Volume high |
| audio-classification | Music note |
| feature-extraction | Layer group |
| sentence-similarity | Left-right arrows |
| reinforcement-learning | Gamepad |
| image-to-image | Images |
| video-classification | Film |
| depth-estimation | Mountain |
| zero-shot-classification | Bullseye |
Models with unrecognized or missing pipeline tags display a default cube icon.
| Endpoint | Purpose |
|---|---|
GET /api/users/{username}/overview |
User profile, avatar, and full name |
GET /api/models?author={username} |
List all models with download and like counts |
GET /api/datasets?author={username} |
List all datasets with download and like counts |
GET /api/spaces?author={username} |
List all spaces with like counts |
GET /api/models/{id} |
Individual model details (fallback for missing stats) |
GET /api/datasets/{id} |
Individual dataset details (fallback for missing stats) |
The following expand parameters are used in list API calls to request additional fields:
downloadsAllTime-- Lifetime total download countdownloads-- Last 30 days download countlikes-- Like countlastModified-- Last modification timestampcreatedAt-- Creation timestamp
| Browser | Minimum Version |
|---|---|
| Chrome | 80+ |
| Firefox | 78+ |
| Safari | 14+ |
| Edge | 80+ |
Requires JavaScript enabled and network access to huggingface.co.
- Rate Limiting -- The HuggingFace API may throttle requests for users with a very large number of repositories. Using a token mitigates this.
- Spaces Downloads -- The HuggingFace API does not provide download counts for Spaces. Only like counts are displayed for the Spaces tab.
- Private Repositories -- Private repositories require a valid access token with appropriate permissions to appear in results.
- Avatar Resolution -- User avatars are loaded from the profile API response. If the avatar URL is unavailable or fails to load, a colored circle with the first letter of the username is displayed as a fallback.
- Concurrent Requests -- Detail fetching for missing like counts is done in sequential batches of 10 to avoid overwhelming the API.
- Download Statistics Accuracy -- The
downloadsAllTimefield may not be available for all repositories. When unavailable, the application falls back to thedownloadsfield (last 30 days) as the lifetime value, which may understate the true total.
This tool is designed specifically for individual HuggingFace user accounts rather than organizations. Key differences include:
| Feature | User Stats | Organization Stats |
|---|---|---|
| Profile avatar shape | Circular with accent border | Rounded square |
| Member count display | Not shown | Displayed when available |
| Organization badge | Not shown | Displayed next to name |
| API endpoint for profile | /api/users/{name}/overview |
/api/organizations/{name} with fallback |
| Avatar fallback chain | Single URL from profile API | Multiple candidate URLs attempted |
This project is open source. See the repository for license details.
Built by prithivMLmods