Downloads · 30 days
1
4% of all-time downloads
krizaantem/politik-ekseni-flan-t5
politik-ekseni-flan-t5 is a machine learning model from krizaantem. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Bu model, Türkçe politik cümleleri dört politik eksenden birine sınıflandırmak için eğitilmiştir:
Downloads · 30 days
1
4% of all-time downloads
All-time downloads
26
Public
Parameters
248M
3 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt2 GB · 50%
From the Hugging Face model README
Bu model, Türkçe politik cümleleri dört politik eksenden birine sınıflandırmak için eğitilmiştir:
Model çıktıları bazen "sa-liberal" veya "sa-otoriter" gibi kısa yazımlarla gelebilir. Aşağıdaki fonksiyonla normalize edebilirsiniz:
def normalize_label(label):
return {
"sa-liberal": "sağ-liberal",
"sa-otoriter": "sağ-otoriter",
"sol-liberal": "sol-liberal",
"sol-otoriter": "sol-otoriter"
}.get(label.strip(), label.strip())
from transformers import T5Tokenizer, T5ForConditionalGeneration
model = T5ForConditionalGeneration.from_pretrained("krizaantem/politik-ekseni-flan-t5")
tokenizer = T5Tokenizer.from_pretrained("krizaantem/politik-ekseni-flan-t5")
sentence = "Piyasa ekonomisi serbest bırakılmalıdır."
input_ids = tokenizer.encode("Sınıflandır: " + sentence, return_tensors="pt")
output = model.generate(input_ids, max_length=10)
raw_label = tokenizer.decode(output[0], skip_special_tokens=True)
print(normalize_label(raw_label))