Spaces:
Running
Running
| ## loading translation model | |
| from transformers import pipeline | |
| model_id = "drrobot9/nllb-ig-yo-ha-finetuned" | |
| translator = pipeline("translation", model=model_id, device=-1) | |
| if __name__ == "__main__": | |
| test_text = "Kedu ihe ị na-eme?" | |
| translation = translator(test_text, src_lang="ibo_Latn", tgt_lang="eng_Latn") | |
| print("Test Translation (Igbo -> English):", translation[0]['translation_text']) |