Update README.md
Browse files
README.md
CHANGED
@@ -1,212 +1,93 @@
|
|
1 |
-
---
|
2 |
-
library_name: transformers
|
3 |
-
tags:
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
|
24 |
|
25 |
## Model Details
|
26 |
|
27 |
-
###
|
28 |
-
|
29 |
-
<!-- Provide a longer summary of what this model is. -->
|
30 |
-
|
31 |
-
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
32 |
-
|
33 |
-
- **Developed by:** [More Information Needed]
|
34 |
-
- **Funded by [optional]:** [More Information Needed]
|
35 |
-
- **Shared by [optional]:** [More Information Needed]
|
36 |
-
- **Model type:** [More Information Needed]
|
37 |
-
- **Language(s) (NLP):** [More Information Needed]
|
38 |
-
- **License:** [More Information Needed]
|
39 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
40 |
-
|
41 |
-
### Model Sources [optional]
|
42 |
-
|
43 |
-
<!-- Provide the basic links for the model. -->
|
44 |
-
|
45 |
-
- **Repository:** [More Information Needed]
|
46 |
-
- **Paper [optional]:** [More Information Needed]
|
47 |
-
- **Demo [optional]:** [More Information Needed]
|
48 |
-
|
49 |
-
## Uses
|
50 |
-
|
51 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
52 |
-
|
53 |
-
### Direct Use
|
54 |
-
|
55 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
56 |
-
|
57 |
-
[More Information Needed]
|
58 |
-
|
59 |
-
### Downstream Use [optional]
|
60 |
-
|
61 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
62 |
|
63 |
-
[More Information Needed]
|
64 |
|
65 |
-
|
66 |
|
67 |
-
|
68 |
|
69 |
-
|
|
|
70 |
|
71 |
-
|
|
|
|
|
72 |
|
73 |
-
|
|
|
74 |
|
75 |
-
|
|
|
76 |
|
77 |
-
|
|
|
|
|
|
|
78 |
|
79 |
-
|
|
|
80 |
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
-
## How to Get Started with the Model
|
84 |
-
|
85 |
-
Use the code below to get started with the model.
|
86 |
-
|
87 |
-
[More Information Needed]
|
88 |
-
|
89 |
-
## Training Details
|
90 |
|
91 |
### Training Data
|
|
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
[More Information Needed]
|
96 |
-
|
97 |
-
### Training Procedure
|
98 |
-
|
99 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
100 |
-
|
101 |
-
#### Preprocessing [optional]
|
102 |
-
|
103 |
-
[More Information Needed]
|
104 |
-
|
105 |
-
|
106 |
-
#### Training Hyperparameters
|
107 |
-
|
108 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
109 |
-
|
110 |
-
#### Speeds, Sizes, Times [optional]
|
111 |
-
|
112 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
113 |
-
|
114 |
-
[More Information Needed]
|
115 |
-
|
116 |
-
## Evaluation
|
117 |
-
|
118 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
119 |
-
|
120 |
-
### Testing Data, Factors & Metrics
|
121 |
-
|
122 |
-
#### Testing Data
|
123 |
-
|
124 |
-
<!-- This should link to a Dataset Card if possible. -->
|
125 |
-
|
126 |
-
[More Information Needed]
|
127 |
-
|
128 |
-
#### Factors
|
129 |
-
|
130 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
131 |
-
|
132 |
-
[More Information Needed]
|
133 |
-
|
134 |
-
#### Metrics
|
135 |
-
|
136 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
137 |
-
|
138 |
-
[More Information Needed]
|
139 |
-
|
140 |
-
### Results
|
141 |
-
|
142 |
-
[More Information Needed]
|
143 |
-
|
144 |
-
#### Summary
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
## Model Examination [optional]
|
149 |
-
|
150 |
-
<!-- Relevant interpretability work for the model goes here -->
|
151 |
-
|
152 |
-
[More Information Needed]
|
153 |
-
|
154 |
-
## Environmental Impact
|
155 |
-
|
156 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
157 |
-
|
158 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
159 |
-
|
160 |
-
- **Hardware Type:** [More Information Needed]
|
161 |
-
- **Hours used:** [More Information Needed]
|
162 |
-
- **Cloud Provider:** [More Information Needed]
|
163 |
-
- **Compute Region:** [More Information Needed]
|
164 |
-
- **Carbon Emitted:** [More Information Needed]
|
165 |
-
|
166 |
-
## Technical Specifications [optional]
|
167 |
-
|
168 |
-
### Model Architecture and Objective
|
169 |
-
|
170 |
-
[More Information Needed]
|
171 |
-
|
172 |
-
### Compute Infrastructure
|
173 |
-
|
174 |
-
[More Information Needed]
|
175 |
-
|
176 |
-
#### Hardware
|
177 |
-
|
178 |
-
[More Information Needed]
|
179 |
-
|
180 |
-
#### Software
|
181 |
-
|
182 |
-
[More Information Needed]
|
183 |
-
|
184 |
-
## Citation [optional]
|
185 |
-
|
186 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
187 |
-
|
188 |
-
**BibTeX:**
|
189 |
-
|
190 |
-
[More Information Needed]
|
191 |
-
|
192 |
-
**APA:**
|
193 |
-
|
194 |
-
[More Information Needed]
|
195 |
-
|
196 |
-
## Glossary [optional]
|
197 |
-
|
198 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
199 |
-
|
200 |
-
[More Information Needed]
|
201 |
-
|
202 |
-
## More Information [optional]
|
203 |
-
|
204 |
-
[More Information Needed]
|
205 |
-
|
206 |
-
## Model Card Authors [optional]
|
207 |
-
|
208 |
-
[More Information Needed]
|
209 |
-
|
210 |
-
## Model Card Contact
|
211 |
|
212 |
-
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
tags:
|
4 |
+
- SDG
|
5 |
+
- ' News'
|
6 |
+
- Articles
|
7 |
+
- Sustainability
|
8 |
+
language: ar
|
9 |
+
widget:
|
10 |
+
- text: >-
|
11 |
+
يواجه العالم اليوم بعضًا من أكبر التحديات التي واجهها منذ عدة أجيال، وهي
|
12 |
+
تحديات تهدد ازدهار الناس واستقرارهم في كافة أنحاء العالم. ووباء الفساد في
|
13 |
+
معظمها.
|
14 |
+
|
15 |
+
فللفساد آثار سليبة على كل جانب من جوانب المجتمع، حيث يتشابك تشابكا وثيقا مع
|
16 |
+
الصراعات والاضطرابات مما يهدد التنمية الاجتماعية والاقتصادية ويقوض أسس
|
17 |
+
المؤسسات الديمقراطية وسيادة القانون.
|
18 |
+
|
19 |
+
ولا يتبع الفساد الصراع فحسب، بل هو كذلك أحد أسبابه الجذرية في كثير من
|
20 |
+
الأحيان. فهو بتقويضه سيادة القانون يغذي الصراعات ويعيق عمليات إحلال السلام،
|
21 |
+
فضلا عن أنه يفاهم الفقر، ويسهل الاستخدام المُجّرم للموارد، وإتاحة التمويل
|
22 |
+
للنزاع المسلح.
|
23 |
+
|
24 |
+
إن منع الفساد وتعزيز الشفافية وتقوية المؤسسات أمر بالغ الأهمية إذا أريد
|
25 |
+
تحقيق الغايات المتوخاة في أهداف التنمية المستدامة.
|
26 |
+
|
27 |
+
ويُراد من احتفالية اليوم العالمي لمكافحة الفساد لعام 2023 تسليط الضوء على
|
28 |
+
الصلة الوثيقة بين مكافحة الفساد والسلام والأمن والتنمية. فجوهر تلك الصلة هو
|
29 |
+
فكرة أن التصدي لهذه الجريمة حق للجميع ومسؤوليتهم، وأن التعاون ومشاركة هما ما
|
30 |
+
يمكنا الأشخاص والمؤسسات من التغلب على الأثر السلبي لهذه الجريمة. فهناك دور
|
31 |
+
للدول وللمسؤولين الحكوميين وللموظفين المدنيين ولموظفي إنفاذ القانون وممثلي
|
32 |
+
وسائل الإعلام والقطاع الخاص وللمجتمع المدني وللأوساط الأكاديمية وللجمهور
|
33 |
+
العام وللشباب بصورة خاصة في توحيد العالم ضد الفساد.
|
34 |
+
metrics:
|
35 |
+
- f1
|
36 |
+
base_model:
|
37 |
+
- UBC-NLP/ARBERTv2
|
38 |
+
pipeline_tag: text-classification
|
39 |
+
---
|
40 |
+
|
41 |
+
# Binary SDG Detection with ArBERTv2
|
42 |
+
|
43 |
+
This model is a binary classifier fine-tuned on the ArBERTv2 architecture, designed to detect mentions of Sustainable Development Goals (SDGs) in Arabic text. The model distinguishes between content related to the United Nations SDGs and non-SDG-related text, enabling the classification of Arabic news articles and other textual data.
|
44 |
|
45 |
|
46 |
|
47 |
## Model Details
|
48 |
|
49 |
+
### Intended Use
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
|
|
51 |
|
52 |
+
The model is intended for use in identifying SDG-related content within large collections of Arabic text, such as news articles, reports, or social media. It can be applied to media analysis, policy research, and academic studies focused on tracking SDG coverage in Arabic-speaking regions.
|
53 |
|
54 |
+
### How to Use
|
55 |
|
56 |
+
````python
|
57 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
58 |
|
59 |
+
# Load the model and tokenizer
|
60 |
+
tokenizer = AutoTokenizer.from_pretrained("Kamel/AraSDG_Binary")
|
61 |
+
model = AutoModelForSequenceClassification.from_pretrained("Kamel/AraSDG_Binary")
|
62 |
|
63 |
+
# Example text input
|
64 |
+
text = "your Arabic text here"
|
65 |
|
66 |
+
# Tokenize input
|
67 |
+
inputs = tokenizer(text, return_tensors="pt")
|
68 |
|
69 |
+
# Perform inference
|
70 |
+
with torch.no_grad():
|
71 |
+
outputs = model(**inputs)
|
72 |
+
logits = outputs.logits
|
73 |
|
74 |
+
# Convert logits to predicted class (0: non-SDG, 1: SDG)
|
75 |
+
predicted_class = torch.argmax(logits, dim=-1).item()
|
76 |
|
77 |
+
# Print the result
|
78 |
+
if predicted_class == 1:
|
79 |
+
print("This text is SDG-related.")
|
80 |
+
else:
|
81 |
+
print("This text is not SDG-related.")
|
82 |
+
````
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
### Training Data
|
86 |
+
The model was fine-tuned on a dataset of Arabic news articles annotated for SDG relevance, augmented with synthetic data generated to balance SDG-related and non-SDG content.
|
87 |
|
88 |
+
### Performance
|
89 |
+
The model achieves a micro F1-score of 98% on a test dataset, demonstrating high accuracy in distinguishing SDG-related from non-SDG-related content.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
+
### Limitations
|
92 |
+
This model only provides binary classification (SDG vs. non-SDG).
|
93 |
+
It is trained specifically for Modern Standard Arabic (MSA) and may not perform as well on dialectal Arabic.
|