Update README.md
Browse files
README.md
CHANGED
@@ -11,6 +11,7 @@ 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 |
'Political':1,
|
15 |
'Economy':2,
|
16 |
'Health':3,
|
@@ -29,6 +30,8 @@ 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 |
|
|
|
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,
|
|
|
30 |
model = T5ForConditionalGeneration.from_pretrained(model_name)
|
31 |
tokenizer = T5Tokenizer.from_pretrained(model_name)
|
32 |
input_text = " الاستاذ حزام جوبح يحصل على براعة اختراع في التعلم العميق"
|
33 |
+
|
34 |
output_text = model.generate(input_text)
|
35 |
+
|
36 |
print(generated_text)
|
37 |
|