Downloads · 30 days
20
19% of all-time downloads
chaouin/coptic-french-translation-hiero
coptic-french-translation-hiero is a translation model from chaouin. Use it when you need text moved from one language to another. It is set up for transformers.
<details <summary<strongClick to expand example usage</strong</summary
Downloads · 30 days
20
19% of all-time downloads
All-time downloads
103
Public
Parameters
484M
1.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.9 GB · 100%
From the Hugging Face model README
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
from uroman import Uroman
import pandas as pd
# Load input
df = pd.read_csv("test.csv")
uroman = Uroman()
df["coptic_text_romanized"] = df["coptic_text"].apply(lambda t: uroman.romanize_string(str(t)))
# Load model
model_name = "chaouin/coptic-french-translation-hiero"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
# Translate
inputs = tokenizer(df["coptic_text_romanized"].tolist(), return_tensors="pt", padding=True, truncation=True)
output = model.generate(**inputs)
translations = [tokenizer.decode(t, skip_special_tokens=True) for t in output]
print(translations)
</details>
➡️ For a complete script to generate translations, see generate_translation_hiero.py
🔬 For full training and evaluation scripts, visit the project repository