notes73
commited on
Commit
·
46eaf56
1
Parent(s):
1c50436
Added files from espa-ai
Browse files- README.md +54 -0
- config.json +24 -0
- model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: "ESPA AI"
|
| 3 |
+
emoji: "🤖"
|
| 4 |
+
colorFrom: "blue"
|
| 5 |
+
colorTo: "green"
|
| 6 |
+
sdk: "transformers"
|
| 7 |
+
sdk_version: "4.21.1"
|
| 8 |
+
app_file: "app.py"
|
| 9 |
+
license: "mit"
|
| 10 |
+
tags:
|
| 11 |
+
- "text-classification"
|
| 12 |
+
- "distilbert"
|
| 13 |
+
- "NLP"
|
| 14 |
+
- "sentiment-analysis"
|
| 15 |
+
short_description: "A DistilBERT-based model fine-tuned on IMDb for text classification."
|
| 16 |
+
---
|
| 17 |
+
# Model Card for ESPA AI
|
| 18 |
+
|
| 19 |
+
ESPA AI is a text classification model fine-tuned on the IMDb dataset using DistilBERT. It is designed to classify movie reviews as either positive or negative.
|
| 20 |
+
|
| 21 |
+
## Model Details
|
| 22 |
+
|
| 23 |
+
### Model Description
|
| 24 |
+
|
| 25 |
+
This model uses the DistilBERT architecture, a smaller, faster version of BERT, to perform sentiment analysis on text data. It has been fine-tuned on the IMDb dataset for binary classification (positive or negative reviews).
|
| 26 |
+
|
| 27 |
+
- **Developed by:** DilipKY
|
| 28 |
+
- **Funded by:** [Optional Information]
|
| 29 |
+
- **Model type:** Transformer-based model (DistilBERT)
|
| 30 |
+
- **Language(s):** English
|
| 31 |
+
- **License:** MIT License
|
| 32 |
+
- **Finetuned from model:** distilbert-base-uncased
|
| 33 |
+
|
| 34 |
+
### Model Sources
|
| 35 |
+
|
| 36 |
+
- **Repository:** [DilipKY/espa-ai](https://huggingface.co/DilipKY/espa-ai)
|
| 37 |
+
- **Paper:** [DistilBERT: A smaller, faster, cheaper version of BERT](https://arxiv.org/abs/1910.01108)
|
| 38 |
+
|
| 39 |
+
## Uses
|
| 40 |
+
|
| 41 |
+
### Direct Use
|
| 42 |
+
|
| 43 |
+
This model can be used to classify text data into positive or negative categories. It is useful for sentiment analysis in applications like customer feedback analysis, review classification, etc.
|
| 44 |
+
|
| 45 |
+
```python
|
| 46 |
+
from transformers import pipeline
|
| 47 |
+
|
| 48 |
+
# Load pre-trained model from Hugging Face
|
| 49 |
+
classifier = pipeline("text-classification", model="DilipKY/espa-ai")
|
| 50 |
+
|
| 51 |
+
# Test on a sample review
|
| 52 |
+
sample_text = "This movie was amazing! The plot was so engaging and the acting was superb."
|
| 53 |
+
result = classifier(sample_text)
|
| 54 |
+
print(result)
|
config.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "distilbert-base-uncased",
|
| 3 |
+
"activation": "gelu",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"DistilBertForSequenceClassification"
|
| 6 |
+
],
|
| 7 |
+
"attention_dropout": 0.1,
|
| 8 |
+
"dim": 768,
|
| 9 |
+
"dropout": 0.1,
|
| 10 |
+
"hidden_dim": 3072,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"max_position_embeddings": 512,
|
| 13 |
+
"model_type": "distilbert",
|
| 14 |
+
"n_heads": 12,
|
| 15 |
+
"n_layers": 6,
|
| 16 |
+
"pad_token_id": 0,
|
| 17 |
+
"qa_dropout": 0.1,
|
| 18 |
+
"seq_classif_dropout": 0.2,
|
| 19 |
+
"sinusoidal_pos_embds": false,
|
| 20 |
+
"tie_weights_": true,
|
| 21 |
+
"torch_dtype": "float32",
|
| 22 |
+
"transformers_version": "4.48.3",
|
| 23 |
+
"vocab_size": 30522
|
| 24 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5e313ab52dbdb8a71a3e3c361ee025df2b917827bbde6c793faab35b470f1f80
|
| 3 |
+
size 267832560
|