The Sinhala Story Generation Model is based on fine-tuning the XLM-RoBERTa base model on a dataset of Sinhala language stories. It is designed to generate coherent and contextually relevant Sinhala text based on story beginnings.
The model is intended for generating creative Sinhala stories or text based on initial prompts. It can be used in applications requiring automated generation of Sinhala text, such as chatbots, content generation, or educational tools.
To use the model for inference via the Hugging Face Inference API, consider the following example Python code:
1
2model_name = "your-username/model-name"
3generator = pipeline("text-generation", model=model_name, tokenizer=model_name)
4
5input_text = "අද සුන්දර දවසක්. හෙට ගැන සිතමින් මම පාර <mask>"
6output = generator(input_text, max_length=150, num_return_sequences=1)
7
8print(output[0]['generated_text'])```