Hezam's picture
Update README.md
6a29910
|
raw
history blame
947 Bytes
metadata
language:
  - ar
metrics:
  - accuracy
  - bleu
library_name: transformers
pipeline_tag: text2text-generation

This model is under trial.

The number in the generated text represents the category of the news, as shown below. category_mapping = { 'Political':1, 'Economy':2, 'Health':3, 'Sport':4, 'Culture':5, 'Technology':6, 'Art':7, 'Accidents':8 }

image/png

Example usage

model_name = "Hezam/arabic-T5-news-classification-generation" from transformers import T5ForConditionalGeneration, T5Tokenizer model = T5ForConditionalGeneration.from_pretrained(model_name) tokenizer = T5Tokenizer.from_pretrained(model_name) input_text = " الاستاذ حزام جوبح يحصل على براعة اختراع في التعلم العميق" output_text = model.generate(input_text) print(generated_text)