Downloads · 30 days
29
5% of all-time downloads
Kongfha/PhraAphaiManee-LM
PhraAphaiManee-LM is a text generation model from Kongfha. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
<font size=4\\ I've created an improved model with better performance, and you can now access it through this link - Kongfha/KlonSuphap-LM \\</font
Downloads · 30 days
29
5% of all-time downloads
All-time downloads
575
Public
Parameters
137M
1 GB on disk
Likes
2
Public
Click a slice to open those files.
.bin510 MB · 49%
How the weights are stored.
F32124M · 91%
From the Hugging Face model README
<font size=4>** I've created an improved model with better performance, and you can now access it through this link -> Kongfha/KlonSuphap-LM **</font>
PhraAphaiManee-LM or GPT-2 for Thai poem (PhraAphaiManee-Style). I use GPT-2 for Thai lyrics, which is based on GPT-2 base Thai as a pre-trained model for PhraAphaiManee (พระอภัยมณี) dataset.
*ตอนนี้ ผมได้ทำโมเดลใหม่ที่สามารถสัมผัสได้ดีกว่าแล้ว สามารถเข้าถึงได้จากลิงก์นี้ -> Kongfha/KlonSuphap-LM* <br> โมเดลนี้เป็น GPT-2 ถูกเทรนด้วยกลอนพระอภัยมณี สำหรับการแต่งกลอนสไตล์พระอภัยมณี
from transformers import pipeline
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "Kongfha/PhraAphaiManee-LM"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
generate = pipeline("text-generation",
model=model,
tokenizer=tokenizer)
input_sentence = "๏ สัมผัสเส้นขอบฟ้าชลาลัย"
generated_text = generate(input_sentence,
max_length=140,
top_k=25,
temperature=1)
# generation parameters can be varied
print(f"Input: {text}")
print(f"Output:\n {generated_text[0]['generated_text']}")