metadata
language:
- zh
- en
license: mit
tags:
- text-classification
- sentiment-analysis
- test
datasets:
- custom
metrics:
- accuracy
model-index:
- name: hugging-face-test-model
results:
- task:
type: text-classification
name: Text Classification
dataset:
name: Test Dataset
type: custom
metrics:
- type: accuracy
value: 0.95
name: Accuracy
Hugging Face 测试模型
这是一个用于测试Hugging Face Pro账号功能的简单模型仓库。
模型描述
这是一个基于DistilBERT的文本分类模型,主要用于:
- 测试Hugging Face Hub的上传功能
- 验证Pro账号的权限
- 演示模型仓库的基本结构
快速开始
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from transformers import pipeline
# 方法1: 使用pipeline
classifier = pipeline("text-classification", model="your-username/hugging-face-test")
result = classifier("这是一个测试文本")
# 方法2: 直接加载模型
tokenizer = AutoTokenizer.from_pretrained("your-username/hugging-face-test")
model = AutoModelForSequenceClassification.from_pretrained("your-username/hugging-face-test")
模型性能
| 指标 | 数值 |
|---|---|
| 准确率 | 95% |
| F1分数 | 0.94 |
训练数据
使用自定义数据集进行训练,包含中英文文本分类任务。
限制说明
这是一个测试模型,不建议用于生产环境。
许可证
MIT License