/EdiTranslator

A simple Web UI that uses the Azure Translator API and Azure Open AI to translate text from one language to another.

Primary LanguageTypeScriptMIT LicenseMIT

Edi's Translator

A simple Web UI that uses the Azure Translator API and Azure Open AI to translate text from one language to another.

image

Features

  • Translate text from one language to another
  • Save translation history
  • API Providers
    • Azure Translator (Text)
    • Azure Open AI (GPT-4o and GPT-3.5 Turbo)

How to Run

Docker

Azure Translator only

docker run -d -p 8080:8080 -e AzureTranslator__Key=********* -e AzureTranslator__Region==********* ediwang/editranslator

Azure Open AI only

docker run -d -p 8080:8080 -e -AzureOpenAI__Endpoint=****** -e AzureOpenAI__Key=********* ediwang/editranslator

Both

docker run -d -p 8080:8080 -e AzureTranslator__Key=********* -e AzureTranslator__Region==********* -e AzureOpenAI__Endpoint=****** -e AzureOpenAI__Key=********* ediwang/editranslator

Code Deployment

See Development section for setup the project. Then use Release configuration to build and deploy to your server.

Please note there is no built in authentication, if you need your users to login, you will need to deploy an authentication provider in front of the app. For example, you can enable SSO in Azure App Service.

Development

  1. Create an Azure Translator instace and get the API key and region
  2. Create an Azure Open AI instance
  • Deploy both GPT-4o and GPT 3.5 Turbo model with deployment name as gpt-4o and gpt-35-turbo
  • Get the API key and endpoint
  1. Open the solution in Visual Studio
  2. Modify appsettings.json or create appsettings.Development.json and set your API key and region like this
{
  "AzureTranslator": {
    "Endpoint": "https://api.cognitive.microsofttranslator.com",
    "Key": "YOUR_AZURE_TRANSLATOR_KEY",
    "Region": "YOUR_AZURE_TRANSLATOR_REGION"
  },
  "AzureOpenAI": {
    "Endpoint": "https://<your_instance>.openai.azure.com/",
    "Key": "YOUR_AZURE_OPENAI_KEY",
  }
}
  1. Run the project

Tech Stack

  • AI: Azure Translator API, Azure Open AI
  • Frontend: Angular
  • Backend: ASP.NET Core

免责申明

对于**访客,我们有一份特定的免责申明。请确保你已经阅读并理解其内容:免责申明(仅限**访客)