miaohaiyuan commited on
Commit
8730353
1 Parent(s): 78163ee

update README

Browse files
Files changed (1) hide show
  1. README.md +13 -51
README.md CHANGED
@@ -1,51 +1,13 @@
1
- # Translation Agent UI: A UI for Andrew's Translation Agent
2
-
3
- This is a gradio UI for Andrew Ng's [Translation Agent](https://github.com/andrewyng/translation-agent). The main features are:
4
- 1. Look inside the reflection agentic workflow during tranlation;
5
- 2. Support other LLM models as translation engine;
6
- 3. Highlight the differences between initial translation and final translation;
7
-
8
- <img width="1280" src="./examples/demo-zh_en.png" alt="Preview"/>
9
- <img width="1280" src="./examples/demo-en_zh.png" alt="Preview"/>
10
-
11
- ## Getting Started
12
-
13
- To get started with `translation-agent-UI`, follow these steps:
14
-
15
- ### Installation:
16
- - The Poetry package manager is required for installation. [Poetry Installation](https://python-poetry.org/docs/#installation) Depending on your environment, this might work:
17
-
18
- ```bash
19
- pip install poetry
20
- ```
21
-
22
- - A .env file with a OPENAI_API_KEY is required to run the workflow. Please copy .env.sample to .env and modified the parameters. Following is an example to use deekseek LLM as a translation engine.
23
- OPENAI_API_KEY="sk-xxxx"
24
- OPENAI_BASE_URL="https://api.deepseek.com"
25
- OPENAI_MODEL = "deepseek-chat"
26
-
27
- - Clone the repo and install the dependencies:
28
- ```bash
29
- git clone https://github.com/andrewyng/translation-agent.git
30
- cd translation-agent
31
- poetry install
32
- poetry shell # activates virtual environment
33
- ```
34
- ### Usage:
35
- python gr_app.py
36
- The web server will be running on local URL: http://127.0.0.1:7860 by default.
37
-
38
- you can also use CLI to
39
- ```python
40
- import translation_agent as ta
41
- source_lang, target_lang, country = "English", "Spanish", "Mexico"
42
- translation = ta.translate(source_lang, target_lang, source_text, country)
43
- ```
44
- See examples/example_script.py for an example script to try out.
45
-
46
- ## License
47
-
48
- Translation Agent UI is released under the **MIT License**. You are free to use, modify, and distribute the code
49
- for both commercial and non-commercial purposes.
50
-
51
-
 
1
+ ---
2
+ title: Translation Agent UI
3
+ emoji:
4
+ colorFrom: gray
5
+ colorTo: pink
6
+ sdk: gradio
7
+ sdk_version: 4.36.1
8
+ app_file: app.py
9
+ pinned: false
10
+ license: mit
11
+ ---
12
+
13
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference