返回顶部
h

huggingface-trendsHuggingFace趋势

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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
1,209
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

huggingface-trends

Hugging Face 热门模型

快速开始

获取热门模型:

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

核心功能

获取热门模型

基本用法:

bash

获取前10个热门模型


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

获取点赞数最多的前5个模型

scripts/hf_trends.py -n 5 -s likes -p http://172.28.96.1:10808

获取下载量最多的模型

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

按任务筛选

按特定AI任务筛选模型:

bash

文本生成模型


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

图像分类模型

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

翻译模型

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

常见任务筛选:

  • - text-generation - 大语言模型
  • image-classification - 视觉模型
  • image-to-text - 多模态模型
  • translation - 机器翻译
  • summarization - 文本摘要
  • question-answering - 问答模型

按框架筛选

按机器学习框架筛选:

bash

仅PyTorch模型


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

仅TensorFlow模型

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

JAX模型

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

导出为JSON

保存结果以供进一步分析:

bash

导出为JSON文件


scripts/hftrends.py -n 10 -j trendingmodels.json -p http://172.28.96.1:10808

使用特定筛选条件导出

scripts/hftrends.py -n 20 -t text-generation -j textmodels.json -p http://172.28.96.1:10808

代理配置

脚本需要HTTP代理才能访问Hugging Face API(网络限制)。

使用-p参数:

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

对于大多数使用v2rayN的WSL2环境:

  • - 代理URL:http://172.28.96.1:10808
  • 或使用动态IP:http://$(ip route show | grep default | awk {print $3}):10808

命令行选项

参数长格式描述默认值
-n--limit获取模型数量10
-s
--sort | 排序方式:trending、likes、downloads、created | trending | | -t | --task | 按任务/流水线筛选 | 无 | | -l | --library | 按框架筛选(pytorch、tensorflow、jax) | 无 | | -j | --json | 将结果导出为JSON文件 | 无 | | -p | --proxy | HTTP请求的代理URL | 无 |

输出格式

脚本以结构化格式显示模型:

🤖 Hugging Face 热门模型 (5 个)
============================================================

  1. 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
...

模型信息

每个模型条目包括:

  • - 模型ID:完整的Hugging Face模型名称
  • 点赞数:点赞数量(流行度指标)
  • 下载量:总下载次数
  • 任务:主要任务/流水线(例如text-generation)
  • 框架:机器学习框架(transformers、pytorch、tensorflow)
  • 创建/更新:日期信息

使用场景

日常监控

每日检查热门模型以获取新发布:

bash

创建每日监控的cron任务


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

特定任务研究

探索特定AI任务的流行模型:

bash

研究热门文本生成模型


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

查找流行的图像转文本模型

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

框架特定分析

按机器学习框架比较模型:

bash

比较PyTorch与TensorFlow的流行度


scripts/hftrends.py -n 20 -l pytorch -j pytorchmodels.json -p http://172.28.96.1:10808
scripts/hftrends.py -n 20 -l tensorflow -j tensorflowmodels.json -p http://172.28.96.1:10808

与OpenClaw集成

在OpenClaw会话中使用:

python

以编程方式获取热门模型


from skills.huggingface-trends.scripts import hf_trends

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

格式化显示

output = fetcher.format_models(models) print(output)

故障排除

网络错误

问题: 网络不可达或连接错误

解决方案: 确保使用-p参数指定代理:
bash
scripts/hf_trends.py -p http://172.28.96.1:10808

检查Windows上v2rayN代理是否正在运行。

空结果

问题: 未找到模型

解决方案: 尝试不同的筛选条件或增加限制数量:
bash
scripts/hf_trends.py -n 50 -p http://172.28.96.1:10808

缺少依赖

问题: 未安装requests包

解决方案: 安装所需依赖:
bash
pip install requests

技术说明

  • - API限制: Hugging Face的公共API在没有认证的情况下不提供专用的热门端点。脚本获取最近的模型并按流行度指标排序。
  • 代理要求: 由于网络限制,所有请求必须通过代理。脚本支持HTTP代理配置。
  • 速率限制: 公共API有速率限制。避免快速连续发送过多请求。
  • 数据新鲜度: 模型从Hugging Face API获取。最近的更改可能需要时间才能反映。

参考

有关模型元数据和可用筛选条件的更多详细信息,请参阅Hugging Face API文档

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 huggingface-trends-1776420055 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 huggingface-trends-1776420055 技能

通过命令行安装

skillhub install huggingface-trends-1776420055

下载

⬇ 下载 huggingface-trends v1.0.0(免费)

文件大小: 5.48 KB | 发布时间: 2026-4-17 19:23

v1.0.0 最新 2026-4-17 19:23
Initial release of huggingface-trends.

- Fetches trending Hugging Face models with filters for task (e.g., text-generation), library (e.g., pytorch), and sort order (trending, likes, downloads).
- Supports exporting results to JSON and displaying in a structured, formatted output.
- Requires HTTP proxy configuration for Hugging Face API access, suitable for constrained network environments.
- Provides command-line and Python API usage for daily monitoring or research.
- Includes troubleshooting tips and use cases for model discovery and comparison.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部