VinMir commited on
Commit
b89a47c
·
verified ·
1 Parent(s): 4f480fa

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +48 -78
README.md CHANGED
@@ -1,78 +1,48 @@
1
- # GordonAI
2
-
3
- GordonAI is an AI package designed for sentiment analysis, emotion detection, and fact-checking classification. The models are pre-trained on three languages: **Italian**, **English**, and **Spanish**.
4
-
5
- ## Features
6
-
7
- - **Sentiment Analysis**: Classifies text into three categories: **positive**, **negative**, and **neutral**.
8
- - **Emotion Detection**: Identifies the six basic emotions defined by Paul Ekman (1992): **joy**, **sadness**, **fear**, **anger**, **surprise**, **disgust** (plus **neutral**).
9
- - **Fact-Checking Classification**: Classifies text into **disinformation**, **hoax**, **fake news**, or **true news**.
10
-
11
- ## Installation
12
-
13
- You can install the package using `pip`. Simply run the following command:
14
-
15
- ```bash
16
- pip install GordonAI
17
- ```
18
-
19
- ## Usage
20
-
21
- ### Sentiment Analysis
22
-
23
- You can use the `SentimentAnalyzer` to predict the sentiment of a text. The analyzer classifies texts as positive, negative, or neutral.
24
-
25
- ```python
26
- from GordonAI.models import SentimentAnalyzer
27
- # Initialize the sentiment analyzer
28
- analyzer = SentimentAnalyzer()
29
- # Predict sentiment of a list of texts
30
- result = analyzer.predict(["This is a great product!", "This is a terrible mistake."])
31
- # Output the predictions
32
- print(result)
33
- ```
34
-
35
- ### Emotion Detection
36
-
37
- You can use the `EmotionAnalyzer` to predict the emotion of a text. The analyzer classifies texts as joy, sadness, fear, anger, surprise, disgust or neutral.
38
-
39
- ```python
40
- from GordonAI.models import EmotionAnalyzer
41
- # Initialize the emotion analyzer
42
- emotion_analyzer = EmotionAnalyzer()
43
- # Predict emotions of a list of texts
44
- result = emotion_analyzer.predict(["I'm so happy today!", "I'm feeling really sad."])
45
- # Output the predictions
46
- print(result)
47
- ```
48
-
49
- ### Fact-Checking Classification
50
- You can use the `FactAnalyzer` to predict whether a texts or a claim falls into categories like disinformation, fake news, hoax, or true news.
51
-
52
- ```python
53
- from GordonAI.models import FactAnalyzer
54
- # Initialize the emotion analyzer
55
- fact_analyzer = FactAnalyzer()
56
- # Predict emotions of a list of texts
57
- result = fact_analyzer.predict(["This news story is about a real event.", "This news article is based on fake information."])
58
- # Output the predictions
59
- print(result)
60
- ```
61
-
62
- ## Requirements
63
- Python >= 3.9
64
- transformers
65
- torch
66
-
67
- You can install the dependencies using:
68
- ```bash
69
- pip install transformers torch
70
- ```
71
-
72
- ## Acknowledgments
73
-
74
- This package is part of the work for my doctoral thesis. I would like to thank **NeoData** and **Università di Catania** for their valuable contributions to the development of this project.
75
-
76
-
77
-
78
-
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ - it
6
+ - es
7
+ base_model:
8
+ - microsoft/mdeberta-v3-base
9
+ pipeline_tag: text-classification
10
+ ---
11
+ # GordonAI
12
+
13
+ GordonAI is an AI package designed for sentiment analysis, emotion detection, and fact-checking classification. The models are pre-trained on three languages: **Italian**, **English**, and **Spanish**.
14
+
15
+ ## Features
16
+
17
+ This model has been trained for emotion detection and can categorize text into one of the six basic the six basic emotions defined by Paul Ekman (1992): **Joy**, **Sadness**, **Fear**, **Anger**, **Surprise**, **Disgust**, and **Neutral**.
18
+
19
+ The model is based on the pre-trained version of mdeberta-v3-base from Microsoft and has been fine-tuned on an emotion detection dataset to adapt to recognizing emotional expressions in text..
20
+
21
+ ## Usage
22
+
23
+ You can use `GordonAI` to predict the emotion of a text.
24
+
25
+ ```python
26
+ from transformers import pipeline
27
+
28
+ # Load the pipeline for text classification
29
+ classifier = pipeline("text-classification", model="VinMir/GordonAI-emotion_detection")
30
+
31
+ # Use the model to classify the emotion of a text
32
+ result = classifier("I love this!")
33
+ print(result)
34
+ ```
35
+
36
+ ## Requirements
37
+ Python >= 3.9
38
+ transformers
39
+ torch
40
+
41
+ You can install the dependencies using:
42
+ ```bash
43
+ pip install transformers torch
44
+ ```
45
+
46
+ ## Acknowledgments
47
+
48
+ This package is part of the work for my doctoral thesis. I would like to thank **NeoData** and **Università di Catania** for their valuable contributions to the development of this project.