File size: 935 Bytes
a70fa8b
 
c4491ba
a70fa8b
 
 
 
 
 
 
 
 
 
 
 
 
9b155cb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70cc5c4
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
license: mit
library_name: transformers
datasets:
- stanfordnlp/sst2
language:
- en
base_model:
- distilbert/distilbert-base-uncased
pipeline_tag: text-classification
tags:
- legal
- PyTorch
- text-classification
- sentiment-analysis
---

# Simple Text Classifier

This is a fine-tuned model for text classification based on `distilbert-base-uncased`.

## Model Details

- Model Type: Text Classification
- Number of Classes: 2
- Hidden Size: 768

## Usage

```python
from transformers import AutoTokenizer
from huggingface_text_classifier.model import SimpleTextClassifier

# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("ajinathgh/sentiment_analysis")
model = SimpleTextClassifier.from_pretrained("ajinathgh/sentiment_analysis")

# Prepare input
inputs = tokenizer("Example text to classify", return_tensors="pt")

# Get predictions
outputs = model(**inputs)
predicted_class = outputs.argmax(-1).item()
```