Spaces:
Runtime error
Runtime error
asafaya/bert-base-arabic Model usage
Browse files- models/space_classify.py +4 -4
models/space_classify.py
CHANGED
|
@@ -10,16 +10,16 @@ def classifyA(text):
|
|
| 10 |
"""
|
| 11 |
classification = pipeline(
|
| 12 |
task="text-classification",
|
| 13 |
-
model="
|
| 14 |
return_all_scores=True
|
| 15 |
)
|
| 16 |
|
| 17 |
result = []
|
| 18 |
# Define mapping dictionary
|
| 19 |
mapping = {
|
| 20 |
-
'
|
| 21 |
-
'
|
| 22 |
-
'
|
| 23 |
}
|
| 24 |
|
| 25 |
output = classification(text)
|
|
|
|
| 10 |
"""
|
| 11 |
classification = pipeline(
|
| 12 |
task="text-classification",
|
| 13 |
+
model="asafaya/bert-base-arabic",
|
| 14 |
return_all_scores=True
|
| 15 |
)
|
| 16 |
|
| 17 |
result = []
|
| 18 |
# Define mapping dictionary
|
| 19 |
mapping = {
|
| 20 |
+
'LABEL_0': 'ΨͺΩΨ―ΩΩ
Ω
ΨΉΩΩΩ
Ψ©',
|
| 21 |
+
'LABEL_1': 'ΨͺΩΨ¬ΩΩ Ψ£Ω Ψ§Ψ±Ψ΄Ψ§Ψ―',
|
| 22 |
+
'LABEL_2': 'Ψ―ΨΉΩ
ΩΩΨ³Ω'
|
| 23 |
}
|
| 24 |
|
| 25 |
output = classification(text)
|