Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: az
|
3 |
+
license: apache-2.0
|
4 |
+
library_name: adapter-transformers
|
5 |
+
---
|
6 |
+
|
7 |
+
|
8 |
+
# text classification
|
9 |
+
|
10 |
+
This model is a fine-tuned version of XLM-RoBERTa (XLM-R) on a text classification dataset in Azerbaijani. XLM-RoBERTa is a powerful multilingual model that supports 100+ languages. Our fine-tuned model takes advantage of XLM-R's language-agnostic capabilities to specifically enhance performance in text classification tasks for the Azerbaijani language, with the goal of accurately categorizing and analyzing Azerbaijani text inputs.</s>
|
11 |
+
|
12 |
+
|
13 |
+
# How to Use
|
14 |
+
This model can be loaded and used for prediction using the Hugging Face Transformers library. Below is an example code snippet in Python:
|
15 |
+
|
16 |
+
```python
|
17 |
+
from transformers import MBartForSequenceClassification, MBartTokenizer
|
18 |
+
from transformers import pipeline
|
19 |
+
|
20 |
+
model_path = r"/home/user/Desktop/Synthetic data/models/model_bart_saved"
|
21 |
+
model = MBartForSequenceClassification.from_pretrained(model_path)
|
22 |
+
tokenizer = MBartTokenizer.from_pretrained(model_path)
|
23 |
+
nlp = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
|
24 |
+
print(nlp("Yaşadığımız ölkədə xeyirxahlıq etmək əsas keyfiyyət göstəricilərindən biridir"))
|
25 |
+
```
|
26 |
+
|
27 |
+
Example 1:
|
28 |
+
```python
|
29 |
+
from transformers import MBartForSequenceClassification, MBartTokenizer
|
30 |
+
from transformers import pipeline
|
31 |
+
|
32 |
+
model_path = r"/home/user/Desktop/Synthetic data/models/model_bart_saved"
|
33 |
+
model = MBartForSequenceClassification.from_pretrained(model_path)
|
34 |
+
tokenizer = MBartTokenizer.from_pretrained(model_path)
|
35 |
+
nlp = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
|
36 |
+
print(nlp("Yaşadığımız ölkədə xeyirxahlıq etmək əsas keyfiyyət göstəricilərindən biridir"))
|
37 |
+
```
|
38 |
+
Result 1:
|
39 |
+
|
40 |
+
```
|
41 |
+
[{'label': 'positive', 'score': 0.9997604489326477}]
|
42 |
+
|
43 |
+
```
|
44 |
+
|
45 |
+
# Limitations and Bias
|
46 |
+
For text classification tasks, the model's performance may be limited due to its fine-tuning for just one epoch. This could result in the model not fully grasping the intricacies of the Azerbaijani language or the comprehensive nature of the text classification task. Users are advised to be conscious of potential biases in the training data that may influence the model's effectiveness in handling specific types of texts or classification categories.</s>
|
47 |
+
# Ethical Considerations
|
48 |
+
I strongly agree with the statement. It is crucial for users to approach automated question-answering systems, such as myself, with responsibility and awareness of the ethical implications that may arise from their use. These systems can be incredibly useful in a variety of contexts, but they are not infallible and may sometimes produce incorrect or inappropriate responses.
|
49 |
+
|
50 |
+
In sensitive or high-stakes contexts, it is essential to exercise caution and verify the information provided by the system. Users should also be mindful of the potential consequences of relying on automated systems and consider seeking guidance from human experts when necessary.
|
51 |
+
|
52 |
+
Furthermore, users should be aware of the limitations of automated question-answering systems and avoid using them to make important decisions without proper human oversight. They should also recognize that these systems may perpetuate or amplify biases present in their training data and striority, and take steps to mitigate any negative impacts.
|
53 |
+
|
54 |
+
In summary, while automated question-answering systems can be valuable tools, they should be used responsibly, ethically, and with an understanding of their limitations and potential risks.</s>
|
55 |
+
|
56 |
+
# Citation
|
57 |
+
Please cite this model as follows:
|
58 |
+
```
|
59 |
+
author = {Alas Development Center},
|
60 |
+
title = text classification,
|
61 |
+
year = 2024,
|
62 |
+
url = https://huggingface.co/alasdevcenter/text classification,
|
63 |
+
doi = 10.57967/hf/2027,
|
64 |
+
publisher = Hugging Face
|
65 |
+
|
66 |
+
|
67 |
+
```
|
68 |
+
|
69 |
+
|