Skip to content

As a user, I want a method for translating an input text using a specific HuggingFace model, so it's easier to generate translations using different models. #11

@laurejt

Description

@laurejt

The method must support the following 3 models:

  • tencent/HY-MT1.5-7B
  • facebook/nllb-200-3.3B
  • google/madlad400-7b-mt

This method should throw an error when an unsupported model is specified.

Inputs:

  • src_lang: str: Source language. Use ISO 639 language codes (e.g., "zh", "ja", "es", "en")
  • tgt_lang: str: Target language. Use ISO 639 language codes
  • text: str: Text to be translated from the source to target language

Output: The translated text as a string.

This issue is dependent on #5, #9, #10

Metadata

Metadata

Assignees

No one assigned

    Labels

    👇this sprintWork scheduled for the current sprint

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions