Gemini Translate App - Flask-based Chatbot Translator API
658
This is a lightweight Python Flask application that runs an HTTP server with a REST endpoint exposed. This endpoint allows you to request translations for any text in any language.
To run the Docker image, use the following command:
docker run -e GEMINI_API_KEYS=your_gemini_api_key_1,your_gemini_api_key2 -p 8080:8080 lolcatcodes/gemini-translate:latest
The app exposes a REST API at the /translate endpoint. You can send a POST request to this endpoint with the following parameters:
Endpoint:
http://localhost:8080/translate
curl -X POST http://localhost:8080/translate \
-H "Content-Type: application/json" \
-d '{
"fromLanguage": "polish",
"toLanguage": "english",
"text": "Nie ma co płakać. Trzeba wziąć się w garść!"
}'
Sample Request Body:
{
"fromLanguage": "polish",
"toLanguage": "english",
"text": "Nie ma co płakać. Trzeba wziąć się w garść!"
}
Sample Response:
{
"translation": "There is nothing to cry about. You need to pull yourself together!"
}
You can find the landing page here. Once there, click on the “Gemini API” tab or the “Learn more about the Gemini API” button.
Alternatively, you can visit the Gemini API landing page directly by clicking here.
Content type
Image
Digest
sha256:2714016ec…
Size
104.9 MB
Last updated
12 months ago
docker pull lolcatcodes/gemini-translate