Edit model card

Generate Thai Lyrics (แต่งเพลงไทยด้วย GPT-2)

GPT-2 for Thai lyrics generation. We use GPT-2 base Thai as a pre-trained model for Siamzone lyrics

เราเทรนโมเดล GPT-2 สำหรับใช้แต่งเนื้อเพลงไทยด้วยเนื้อเพลงจากเว็บไซต์ Siamzone

Example use

from transformers import pipeline
from transformers import GPT2Model, GPT2TokenizerFast, AutoModelForCausalLM, AutoTokenizer

model_name = "tupleblog/generate-thai-lyrics"
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
model.config.pad_token_id = model.config.eos_token_id


nlp = pipeline(
    "text-generation",
    model=model,
    tokenizer=tokenizer
)
text = "ความรัก"
nlp(text, max_length=100, top_k=40, temperature=0.8) # varying the temperature and top-k produce different output
Downloads last month
58
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.