General Introduction
Translation Agent WebUI is a Gradio-based web user interface designed for Andrewyng's translation-agent. The tool automatically detects the language of the input text and performs lexical processing on the text, highlighting the differences between translations. It supports a variety of translation APIs, including Groq, OpenAI, Cohere, Ollama, Together AI, and Huggingface Inference APIs, which allow users to enter text and select the desired translation model through a simple interface, making it easy to achieve efficient multilingual translation.
A gradio webui of WUENDA translation-agent can automatically detect the language of the input text, support the display of text segmentation, and highlight the differences between different translation versions. However, the actual translation of long text may be slightly less effective thanTranslation of the "English instruction template" into "Chinese instructions", retaining the original formatting
Function List
- Automatic detection of input text language
- text segmentation process
- Highlighting differences between translations
- Support for multiple translation APIs (Groq, OpenAI, Cohere, Ollama, Together AI, Huggingface Inference API)
- Llama-Index support, easy to modify to add more APIs
- Provide Huggingface Space demo
Using Help
Installation process
- Cloning Warehouse:
git clone https://github.com/snekkenull/translation-agent-webui.git
- Go to the project catalog:
cd translation-agent-webui
- Install the dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
Usage Process
- Open a browser and access a locally running application (usually the
http://localhost:7860
). - Enter the text to be translated in the input box, and the system will automatically detect the text language.
- Select the desired translation API and model, e.g. Huggingface Inference API, and enter the model ID (e.g.
mistralai/Mistral-7B-Instruct-v0.3
). - Clicking on the "Translate" button displays the translation results and highlights the differences between the different translations.
- Users can adjust the input text or select different translation APIs for comparison as needed.
Main Functions
- Automatic language detection: When you enter text, the system automatically recognizes the language of the text without the need to select it manually.
- word processing: The system will process the input text into words, so that the user can easily view the translation of each word.
- Difference Highlighting: When displaying translation results, the system highlights the differences between different translations to help users better understand the results.
- Multi-API support: Users can select different translation APIs and choose the most suitable translation model according to their needs.
- Huggingface Space Demo: An online demo is available so that users can experience the translation feature directly on Huggingface Space.
With the above steps, users can easily install and use Translation Agent WebUI to realize efficient multi-language translation.
translation-agent original project
Project address: https://github.com/andrewyng/translation-agent
Agent translation using reflective workflows
Mr. Wu Enda's open source project, a Python demo of the Reflection Agent workflow for machine translation.
Main Steps:
- Designing LLM cue word translation text;
- Allow LLM to reflect on the translation in order to make constructive suggestions for improvement.
- Use suggestions to improve translations.
Extended Directions.
- Try other LLMs (instead of gpt-4-turbo)
- Glossary Creation
- Use and implementation of glossaries
- Assessment of different languages
- error analysis
- Better assessment