This package contains implementation of a translator between languages with Gemini Pro integrated into it.
Project description
gemini-pro-translator
Gemini Pro Translator is a translation application inspired by Google Translate and integrated with Gemini Pro.
Source Code
The source code of the application Gemini Pro Translator is available in Source Code.
Installation
pip install gemini-pro-translator
How to Use the Application?
Pre-requisites:
- Python installed in your device.
- .env file in the same directory as <GEMINI_PRO_TRANSLATOR_DIRECTORY> and has the value of GEMINI_API_KEY.
First, open a Terminal or Command Prompt window and run the following command.
cd <GEMINI_PRO_TRANSLATOR_DIRECTORY>
python3 main.py
Note: Replace <GEMINI_PRO_TRANSLATOR_DIRECTORY> with the path to the directory of the application Gemini Pro Translator.
Then, the application will start with something looking like in the screenshot below.
You will then be asked to input the following values.
- Temperature - between 0 and 1 inclusive
- Top P - between 0 and 1 inclusive
- Top K - at least 1
- Max output tokens - at least 1
The following screenshot shows what is displayed after inputting the mentioned values.
You will be required to input the following pieces of information.
- The name of the language you want to translate text from.
- The path of the file containing the text to be translated.
- The name of the language you want to translate text to (must be different from the one in step 1).
- The name of the file you want the translated text to be placed in (include the file name and its extension only).
Once you enter the values mentioned above, the file containing the translated text will be created inside "texts" directory. Then, you will be asked whether you still want to continue unit testing or not. If you enter 'Y', you will be redirected to an application window like in screenshot above. Else, you will exit the application.
Below demonstrates how the file containing the translated text looks like.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gemini-pro-translator-1.tar.gz.
File metadata
- Download URL: gemini-pro-translator-1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.31.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07d621b1c9eb317b622d6c8570eac07dd2226d3b1323b5069571a2289c475fde
|
|
| MD5 |
181cccfd7c268b0c09b17102e0133f11
|
|
| BLAKE2b-256 |
180f50ee7473f9a8fb8b47d4fdc355c5c47e10896f1e3696735da433a975ef92
|
File details
Details for the file gemini_pro_translator-1-py3-none-any.whl.
File metadata
- Download URL: gemini_pro_translator-1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.31.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
088672c6a5f719ca349768e6e0edafb5affc030f0e1e020bfcce9119b398f9e2
|
|
| MD5 |
3cf2e063eb59a76e1d1445d199949936
|
|
| BLAKE2b-256 |
a770d49639487836b40fa8f4ad9232fe3c9a3ecdc1b17b202d460f8afd57cbda
|