English to Uzbek Translation Model

This repository provides a translation model based on facebook/nllb-200-distilled-600M to translate text from English to Uzbek. The model also supports translation to a partial list of other languages, offering flexibility for multi-language translation tasks.


Model Description:

Model Name:

  • facebook/nllb-200-distilled-600M

Task:

  • Text Translation (English → Uzbek)

License:

  • Apache-2.0

Supported Languages:

  • Primary: English → Uzbek
  • Partial support for additional languages (e.g., Russian, Azerbaijani, etc.)

Installation

To use the model, install the required dependencies first:

pip install transformers torch

Example Usage


  from transformers import MarianMTModel, MarianTokenizer
  
  # Load the pre-trained model and tokenizer
  model_name = 'booba-uz/english-uzbek-translation_v1'
  model = MarianMTModel.from_pretrained(model_name)
  tokenizer = MarianTokenizer.from_pretrained(model_name)
  
  # Function to translate text
  def translate_text(text: str, target_lang: str = 'uz'):
      # Tokenize the input text
      inputs = tokenizer.encode(text, return_tensors="pt", padding=True)
      # Translate the input text
      translated = model.generate(inputs, num_beams=5, max_length=200, early_stopping=True)
      # Decode the output
      translated_text = tokenizer.decode(translated[0], skip_special_tokens=True)
      return translated_text
  
  # Example input text
  input_text = "An Azerbaijan Airlines Embraer ERJ-190AR aircraft crashed at Aktau Airport in Kazakhstan while attempting an emergency landing. The plane, registered as 4K-AZ65, was carrying 67 passengers and five crew members at the time. Some media reports suggest that the number of passengers exceeded 100, with over 60 identified as Russian citizens."
  
  # Translate the input text to Uzbek
  output_text = translate_text(input_text)
  print("Translated text:", output_text)

Test and Comparing

  • "An Azerbaijan Airlines Embraer ERJ-190AR aircraft crashed at Aktau Airport in Kazakhstan while attempting an emergency landing. The plane, registered as 4K-AZ65, was carrying 67 passengers and five crew members at the time. Some media reports suggest that the number of passengers exceeded 100, with over 60 identified as Russian citizens."

  • Booba

Anen Azerbaijan Airlines Embraer ERJ-190AR samolyotlari favqulodda qo'nishga kirishga urinayotganda Qazaxistonning Aktau aeroportida halokatga uchradi. 4K-AZ65 nomli aviakompaniya o'sha vaqtda 67 yo'lovchi va beshta ekipaj a'zosi bilan birga edi. Ayrim ommaviy axborot vositalarining xabarlariga ko'ra, yo'lovchilar soni 100 dan oshgan, ularning 60 dan oshiqining rus fuqarolari ekanligi aniqlandi.

  • Google

Ozarbayjon aviakompaniyasining Embraer ERJ-190AR samolyoti Qozog‘istonning Aktau aeroportida favqulodda qo‘nishga urinayotgan vaqtda halokatga uchradi. 4K-AZ65 sifatida ro‘yxatga olingan samolyotda o‘sha paytda 67 yo‘lovchi va besh nafar ekipaj a’zosi bo‘lgan. Ayrim ommaviy axborot vositalarida yo‘lovchilar soni 100 dan oshgani, 60 dan ortig‘i Rossiya fuqarolari ekani aytilmoqda.

  • Yandex

Ozarbayjon aviakompaniyasining Embraer ERJ-190ar samolyoti Favqulodda qo'nishga urinayotganda Qozog'istonning Aktau aeroportida qulab tushdi. 4K-AZ65 sifatida ro'yxatdan o'tgan samolyotda o'sha paytda 67 yo'lovchi va besh ekipaj a'zosi bo'lgan. Ba'zi OAV xabarlariga ko'ra, yo'lovchilar soni 100 dan oshgan, 60 dan ortiq Rossiya fuqarolari aniqlangan.

Note:

This model was built with open source dataset, if there is any mistakes, sorry us!

Downloads last month
63
Safetensors
Model size
615M params
Tensor type
F32
·
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.

Model tree for booba-uz/english-uzbek-translation_v1

Finetuned
(96)
this model

Dataset used to train booba-uz/english-uzbek-translation_v1

Space using booba-uz/english-uzbek-translation_v1 1