File size: 855 Bytes
d518c5f 7f09c4a 5521368 d851aa5 1e4e225 5febc01 2d743ea 5febc01 2f599c1 5febc01 2d743ea |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
---
license: mit
widget:
- বহুল আলোচিত দশম জাতীয় সংসদ
- গাজীপুরের কালিয়াকৈর উপজেলার তেলিরচালা
---
```py
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("saiful9379/Bangla_GPT2")
model = AutoModelForCausalLM.from_pretrained("saiful9379/Bangla_GPT2", from_tf=True)
text = "বহুল আলোচিত দশম জাতীয় সংসদ"
input_ids = tokenizer.encode(text, return_tensors='tf')
output = model.generate(
input_ids,
max_length=175,
num_beams=10,
temperature=0.7,
no_repeat_ngram_size=2,
num_return_sequences=5
)
predicted_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(predicted_text)
``` |