Update README.md
Browse files
README.md
CHANGED
@@ -22,5 +22,15 @@ category_mapping = {
|
|
22 |
'Accidents':8
|
23 |
}
|
24 |
|
25 |
-
![image/png](https://cdn-uploads.huggingface.co/production/uploads/645817bb72b60ae7a37f8f40/CusM9DM07Mg3lNwXQnkEB.png)
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
'Accidents':8
|
23 |
}
|
24 |
|
|
|
25 |
|
26 |
+
model_name = "Hezam/arabic-T5-news-classification-generation"
|
27 |
+
|
28 |
+
from transformers import T5ForConditionalGeneration, T5Tokenizer
|
29 |
+
|
30 |
+
model = T5ForConditionalGeneration.from_pretrained(model_name)
|
31 |
+
tokenizer = T5Tokenizer.from_pretrained(model_name)
|
32 |
+
|
33 |
+
# Example usage
|
34 |
+
input_text = " الاستاذ حزام جوبح يحصل على براعة اختراع في التعلم العميق"
|
35 |
+
output_text = model.generate(input_text)
|
36 |
+
print(generated_text)
|