FoundationsofInformationRetrieval
commited on
Commit
•
8060aea
1
Parent(s):
a613d9d
Update README.md
Browse files
README.md
CHANGED
@@ -2,33 +2,37 @@
|
|
2 |
tags:
|
3 |
- bert
|
4 |
- transformer
|
5 |
-
- text-classification
|
6 |
-
license: apache-2.0
|
7 |
-
---
|
8 |
|
9 |
# Model Card for BERT
|
10 |
|
11 |
## Model Description
|
12 |
-
This is a BERT model fine-tuned for
|
13 |
|
14 |
## Intended Use
|
15 |
-
- **Primary use case:**
|
16 |
-
- **Limitations:**
|
17 |
|
18 |
## Training Data
|
19 |
-
This model was trained on [
|
20 |
|
21 |
## Evaluation Results
|
22 |
-
The model achieves the following results on
|
23 |
-
- Accuracy:
|
24 |
-
- F1 Score:
|
25 |
|
26 |
## How to Use
|
27 |
Here’s how to load and use the model in Python:
|
28 |
|
29 |
```python
|
30 |
-
from transformers import
|
31 |
|
32 |
model_name = "FoundationsofInformationRetrieval/my_model_repo"
|
33 |
-
model =
|
34 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
|
|
|
|
|
|
|
|
2 |
tags:
|
3 |
- bert
|
4 |
- transformer
|
5 |
+
- text-classification
|
6 |
+
license: apache-2.0
|
7 |
+
---
|
8 |
|
9 |
# Model Card for BERT
|
10 |
|
11 |
## Model Description
|
12 |
+
This is a BERT model fine-tuned for sentiment analysis. BERT (Bidirectional Encoder Representations from Transformers) is a transformer-based model designed to understand the context of words in search queries.
|
13 |
|
14 |
## Intended Use
|
15 |
+
- **Primary use case:** Sentiment analysis on social media posts.
|
16 |
+
- **Limitations:** The model may exhibit biases present in the training data and may not perform well on out-of-domain data.
|
17 |
|
18 |
## Training Data
|
19 |
+
This model was trained on the [Stanford Sentiment Treebank]. The dataset consists of 11,855 labeled sentences for sentiment classification.
|
20 |
|
21 |
## Evaluation Results
|
22 |
+
The model achieves the following results on the Stanford Sentiment Treebank:
|
23 |
+
- Accuracy: 92%
|
24 |
+
- F1 Score: 0.91
|
25 |
|
26 |
## How to Use
|
27 |
Here’s how to load and use the model in Python:
|
28 |
|
29 |
```python
|
30 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
31 |
|
32 |
model_name = "FoundationsofInformationRetrieval/my_model_repo"
|
33 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
34 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
35 |
+
|
36 |
+
# Example usage
|
37 |
+
inputs = tokenizer("I love using Hugging Face!", return_tensors="pt")
|
38 |
+
outputs = model(**inputs)
|