shawnnju commited on
Commit
716af0d
·
verified ·
1 Parent(s): 44c768e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -0
README.md CHANGED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## 如何使用该模型
2
+
3
+ ### 使用 Transformers 库
4
+
5
+ ```python
6
+ from transformers import pipeline
7
+
8
+ # 使用模型
9
+ classifier = pipeline('sentiment-analysis', model='your-username/your-model-name')
10
+ result = classifier('这是一个好模型!')
11
+ print(result)
12
+
13
+ ### 3. 确保模型文件正确
14
+ - **模型文件**:包括 `pytorch_model.bin`、`tf_model.h5`、`config.json` 等。
15
+ - **Tokenizer 文件**:如 `tokenizer.json` 或 `vocab.txt`。
16
+
17
+ ### 4. 添加模型卡片
18
+ 在 `README.md` 中添加模型卡片元数据,例如:
19
+
20
+ ```markdown
21
+ ---
22
+ tags:
23
+ - sentiment-analysis
24
+ - transformers
25
+ - pytorch
26
+ license: apache-2.0
27
+ ---
28
+
29
+ # 模型名称
30
+
31
+ 这是一个用于情感分析的模型。