File size: 1,347 Bytes
e3a977f
e1a87b1
e3a977f
 
 
 
407c7e9
e3a977f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ea340dc
e3a977f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
407c7e9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
title: Language Translator
emoji: πŸš€
colorFrom: indigo
colorTo: red
sdk: gradio
sdk_version: 4.37.2
app_file: app.py
pinned: false
license: mit
---

# Language Translator 
## Introduction 
Open AI Translator is the Power tool to translate English to Vietnamese Language. Using the Large Language Model (LLM) like GPT-3.5-turbo, ... for translation

The project is built in Python Which include API by FastAPI and User Interface by Gradio 

## Getting Started
### Environment Setup
1. Clone the repository: 
   ```commandline
   git clone [email protected]:spaces/myn0908/Language-Translation
   ```
2. The project is require: Python 3.9+ 
3. Install dependencies by:
    ```
   pip install -r requirements.txt
   ```
### How to Use 
1. For running with command line in terminal: 
   For input is text and dest_language 
    ```commandline
    python test_local_translator.py --text 'your input text' --dest_language 'vi'
    ```
   For input is json file 
    ```commandline
    python test_local_translator.py --json 'your json file' 
    ```
   Noted: You can set your api key with argument --openai_api_key and set the model name with --openai_model or you can use api key and model with my default.
2. For running API: 
   ```commandline
   uvicorn api:app --reload
   ```
3. For running User Interface
   ```commandline
   python app.py 
   ```