← 返回
AI智能 中文

Huggingface Trends

Monitor and fetch trending models from Hugging Face with support for filtering by task, library, and popularity metrics. Use when users want to check trending AI models, compare model popularity, or explore popular models by task or library. Supports export to JSON and formatted output.
从Hugging Face获取热门AI模型,支持按任务、库和热度筛选。可用于查看趋势模型、比较热度或探索流行模型。支持JSON导出和格式化输出。
tianxingleo
AI智能 clawhub v1.0.0 1 版本 99760.7 Key: 无需
★ 1
Stars
📥 2,064
下载
💾 104
安装
1
版本
#latest

概述

Hugging Face Trending Models

Quick Start

Fetch the top trending models:

scripts/hf_trends.py -n 10 -p http://172.28.96.1:10808

Core Features

Fetch Trending Models

Basic usage:

# Get top 10 trending models
scripts/hf_trends.py -n 10 -p http://172.28.96.1:10808

# Get top 5 most liked models
scripts/hf_trends.py -n 5 -s likes -p http://172.28.96.1:10808

# Get most downloaded models
scripts/hf_trends.py -n 10 -s downloads -p http://172.28.96.1:10808

Filter by Task

Filter models by specific AI tasks:

# Text generation models
scripts/hf_trends.py -n 10 -t text-generation -p http://172.28.96.1:10808

# Image classification models
scripts/hf_trends.py -n 10 -t image-classification -p http://172.28.96.1:10808

# Translation models
scripts/hf_trends.py -n 10 -t translation -p http://172.28.96.1:10808

Common task filters:

  • text-generation - Large language models
  • image-classification - Vision models
  • image-to-text - Multimodal models
  • translation - Machine translation
  • summarization - Text summarization
  • question-answering - QA models

Filter by Library

Filter by ML framework:

# PyTorch models only
scripts/hf_trends.py -n 10 -l pytorch -p http://172.28.96.1:10808

# TensorFlow models only
scripts/hf_trends.py -n 10 -l tensorflow -p http://172.28.96.1:10808

# JAX models
scripts/hf_trends.py -n 10 -l jax -p http://172.28.96.1:10808

Export to JSON

Save results for further analysis:

# Export to JSON file
scripts/hf_trends.py -n 10 -j trending_models.json -p http://172.28.96.1:10808

# Export with specific filters
scripts/hf_trends.py -n 20 -t text-generation -j text_models.json -p http://172.28.96.1:10808

Proxy Configuration

The script requires an HTTP proxy to access Hugging Face API (network restrictions).

Use the -p flag:

scripts/hf_trends.py -p http://172.28.96.1:10808

For most WSL2 environments with v2rayN:

  • Proxy URL: http://172.28.96.1:10808
  • Or use dynamic IP: http://$(ip route show | grep default | awk '{print $3}'):10808

Command-Line Options

FlagLong FormDescriptionDefault
---------------------------------------
-n--limitNumber of models to fetch10
-s--sortSort by: trending, likes, downloads, createdtrending
-t--taskFilter by task/pipelineNone
-l--libraryFilter by library (pytorch, tensorflow, jax)None
-j--jsonExport results to JSON fileNone
-p--proxyProxy URL for HTTP requestsNone

Output Format

The script displays models in a structured format:

🤖 Hugging Face 热门模型 (5 个)
============================================================
1. moonshotai/Kimi-K2.5
   ⭐ 2.0K likes   📥 647.6K downloads
   📊 Task: image-text-to-text   📚 Library: transformers
   📅 Created: 2026-01-01   Updated: N/A
...

Model Information

Each model entry includes:

  • Model ID: Full Hugging Face model name
  • Likes: Number of likes (popularity metric)
  • Downloads: Total download count
  • Task: Primary task/pipeline (e.g., text-generation)
  • Library: ML framework (transformers, pytorch, tensorflow)
  • Created/Updated: Date information

Use Cases

Daily Monitoring

Check trending models daily for new releases:

# Create cron job for daily monitoring
0 9 * * * cd /home/ltx/.openclaw/workspace && \
  /home/ltx/.openclaw/workspace/skills/huggingface-trends/scripts/hf_trends.py \
  -n 20 -p http://172.28.96.1:10808 >> /tmp/hf-trends.log 2>&1

Task-Specific Research

Explore popular models for specific AI tasks:

# Research trending text generation models
scripts/hf_trends.py -n 15 -t text-generation -s likes -p http://172.28.96.1:10808

# Find popular image-to-text models
scripts/hf_trends.py -n 15 -t image-to-text -s downloads -p http://172.28.96.1:10808

Framework-Specific Analysis

Compare models by ML framework:

# Compare PyTorch vs TensorFlow popularity
scripts/hf_trends.py -n 20 -l pytorch -j pytorch_models.json -p http://172.28.96.1:10808
scripts/hf_trends.py -n 20 -l tensorflow -j tensorflow_models.json -p http://172.28.96.1:10808

Integration with OpenClaw

Use within OpenClaw sessions:

# Fetch trending models programmatically
from skills.huggingface-trends.scripts import hf_trends

fetcher = hf_trends.HuggingFaceTrends(proxy="http://172.28.96.1:10808")
models = fetcher.fetch_trending_models(limit=10)

# Format for display
output = fetcher.format_models(models)
print(output)

Troubleshooting

Network Errors

Problem: "Network is unreachable" or connection errors

Solution: Ensure proxy is specified with -p flag:

scripts/hf_trends.py -p http://172.28.96.1:10808

Check if v2rayN proxy is running on Windows.

Empty Results

Problem: "No models found"

Solution: Try different filters or increase limit:

scripts/hf_trends.py -n 50 -p http://172.28.96.1:10808

Dependencies Missing

Problem: "requests package not installed"

Solution: Install required dependencies:

pip install requests

Technical Notes

  • API Limitation: Hugging Face's public API doesn't provide a dedicated trending endpoint without authentication. The script fetches recent models and sorts by popularity metrics.
  • Proxy Requirement: Due to network restrictions, all requests must go through a proxy. The script supports HTTP proxy configuration.
  • Rate Limits: The public API has rate limits. Avoid making too many requests in quick succession.
  • Data Freshness: Models are fetched from the Hugging Face API. Recent changes may take time to reflect.

Reference

See Hugging Face API Documentation for more details on model metadata and available filters.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 23:17 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 710 📥 243,639
productivity

Markdown to PDF Converter (v2.0)

tianxingleo
离线Markdown转PDF转换器,基于Pandoc与WeasyPrint,支持完整Unicode及本地表情缓存,可将Markdown转为专业级PDF...
★ 2 📥 1,567
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,353 📥 317,895