Update README.md
Browse files
README.md
CHANGED
@@ -57,23 +57,6 @@ widget:
|
|
57 |
# # Example usage
|
58 |
```python
|
59 |
|
60 |
-
from transformers import T5ForConditionalGeneration, T5Tokenizer, pipeline
|
61 |
-
|
62 |
-
model_name = "Hezam/ArabicT5_Classification"
|
63 |
-
model = T5ForConditionalGeneration.from_pretrained(model_name)
|
64 |
-
tokenizer = T5Tokenizer.from_pretrained(model_name)
|
65 |
-
generation_pipeline = pipeline("text-classification",model=model,tokenizer=tokenizer)
|
66 |
-
|
67 |
-
text = "الزين فيك القناه الاولي المغربيه الزين فيك القناه الاولي المغربيه اخبارنا المغربيه متابعه تفاجا زوار موقع القناه الاولي المغربي"
|
68 |
-
output= generation_pipeline(text,
|
69 |
-
num_beams=10,
|
70 |
-
max_length=3,
|
71 |
-
top_p=0.9,
|
72 |
-
repetition_penalty = 3.0,
|
73 |
-
no_repeat_ngram_size = 3)
|
74 |
-
|
75 |
-
output
|
76 |
-
|
77 |
```bash
|
78 |
-
|
79 |
```
|
|
|
57 |
# # Example usage
|
58 |
```python
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
```bash
|
61 |
+
|
62 |
```
|