Sudheer17 commited on
Commit
02445dd
Β·
verified Β·
1 Parent(s): 8ccdeac

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +109 -0
README.md ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: transformers
4
+ pipeline_tag: text-classification
5
+ ---
6
+
7
+ # Sentiment Analysis Models
8
+
9
+ This repository contains multiple trained sentiment analysis models for binary sentiment classification (Positive / Negative).
10
+
11
+ ## Repository Structure
12
+
13
+ ```
14
+ Sentiment/
15
+ β”‚
16
+ β”œβ”€β”€ BERT/
17
+ β”œβ”€β”€ Bi_LSTM/
18
+ β”œβ”€β”€ Linear_Svm/
19
+ β”œβ”€β”€ Logistic_Regression/
20
+ β”œβ”€β”€ Lstm/
21
+ β”œβ”€β”€ Naive Bayes/
22
+ β”œβ”€β”€ XGBoost/
23
+ └── Notebooks/
24
+ ```
25
+
26
+ ---
27
+
28
+ # Available Models
29
+
30
+ - BERT
31
+ - LSTM
32
+ - Bi-LSTM
33
+ - Logistic Regression
34
+ - Linear SVM
35
+ - Naive Bayes
36
+ - XGBoost
37
+
38
+ ---
39
+
40
+ # Using the BERT Model
41
+
42
+ ```python
43
+ from transformers import pipeline
44
+
45
+ classifier = pipeline(
46
+ "text-classification",
47
+ model="Sudheer17/Sentiment/BERT"
48
+ )
49
+
50
+ result = classifier("I love this movie!")
51
+
52
+ print(result)
53
+ ```
54
+
55
+ Example Output
56
+
57
+ ```python
58
+ [{'label': 'Positive', 'score': 0.9848}]
59
+ ```
60
+
61
+ ---
62
+
63
+ # Example Inputs
64
+
65
+ ```text
66
+ I love this movie!
67
+ ```
68
+
69
+ ```text
70
+ This is the worst experience ever.
71
+ ```
72
+
73
+ ```text
74
+ The service was average.
75
+ ```
76
+
77
+ ---
78
+
79
+ # Notes
80
+
81
+ - The BERT model can be loaded directly using the Hugging Face Transformers library.
82
+ - Classical Machine Learning and Deep Learning models are stored in their respective folders.
83
+ - Use the appropriate tokenizer and preprocessing pipeline when working with non-BERT models.
84
+
85
+ ---
86
+
87
+ # Requirements
88
+
89
+ ```
90
+ transformers
91
+ torch
92
+ tensorflow
93
+ scikit-learn
94
+ joblib
95
+ numpy
96
+ pandas
97
+ ```
98
+
99
+ Install them using:
100
+
101
+ ```bash
102
+ pip install transformers torch tensorflow scikit-learn joblib numpy pandas
103
+ ```
104
+
105
+ ---
106
+
107
+ # License
108
+
109
+ This repository is released under the MIT License.