Update README.md
Browse files
README.md
CHANGED
@@ -11,7 +11,6 @@ This model is under trial.
|
|
11 |
|
12 |
The number in the generated text represents the category of the news, as shown below.
|
13 |
category_mapping = {
|
14 |
-
|
15 |
'Political':1,
|
16 |
'Economy':2,
|
17 |
'Health':3,
|
@@ -24,13 +23,12 @@ category_mapping = {
|
|
24 |
|
25 |
![image/png](https://cdn-uploads.huggingface.co/production/uploads/645817bb72b60ae7a37f8f40/6gZDjcAOhWLvN5xF-E2FE.png)
|
26 |
|
27 |
-
|
28 |
model_name = "Hezam/arabic-T5-news-classification-generation"
|
29 |
from transformers import T5ForConditionalGeneration, T5Tokenizer
|
30 |
model = T5ForConditionalGeneration.from_pretrained(model_name)
|
31 |
tokenizer = T5Tokenizer.from_pretrained(model_name)
|
32 |
-
# Example usage
|
33 |
input_text = " الاستاذ حزام جوبح يحصل على براعة اختراع في التعلم العميق"
|
34 |
output_text = model.generate(input_text)
|
35 |
print(generated_text)
|
36 |
-
|
|
|
11 |
|
12 |
The number in the generated text represents the category of the news, as shown below.
|
13 |
category_mapping = {
|
|
|
14 |
'Political':1,
|
15 |
'Economy':2,
|
16 |
'Health':3,
|
|
|
23 |
|
24 |
![image/png](https://cdn-uploads.huggingface.co/production/uploads/645817bb72b60ae7a37f8f40/6gZDjcAOhWLvN5xF-E2FE.png)
|
25 |
|
26 |
+
# Example usage
|
27 |
model_name = "Hezam/arabic-T5-news-classification-generation"
|
28 |
from transformers import T5ForConditionalGeneration, T5Tokenizer
|
29 |
model = T5ForConditionalGeneration.from_pretrained(model_name)
|
30 |
tokenizer = T5Tokenizer.from_pretrained(model_name)
|
|
|
31 |
input_text = " الاستاذ حزام جوبح يحصل على براعة اختراع في التعلم العميق"
|
32 |
output_text = model.generate(input_text)
|
33 |
print(generated_text)
|
34 |
+
|