Skip to content

Image generator using Google Translate and DALL-E artificial intelligence, regardless of language according to the words entered

Notifications You must be signed in to change notification settings

ilyasaglar/DALL-E-image-creator-with-Google-Translate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image generator using DALL-E artificial intelligence with Google Translate

spring logo java logo

The sentence you enter in any language is translated into English with Google Translate. Then, with this translation, DALL-E artificial intelligence creates as many pictures as the number entered on the screen for you.

Prompt: required
Piece: not requeired -> default: 1
Size: not required -> default: 1024x1024

---------------------------------------------------------------------------------------------------------------------------------------------------

###

DALL-E

Go to https://openai.com/api/login
Create a OpenAI Account
Go to https://platform.openai.com/account/api-keys
Create new API key
DALL-E API is paid to use, for information about fees: https://openai.com/api/pricing/

DALL-E API Documentation: https://platform.openai.com/docs/api-reference/images


Example Request:

curl https://api.openai.com/v1/images/generations \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
  "prompt": "A cute baby sea otter",
  "n": 2,
  "size": "1024x1024"
}'

---------------------------------------------------------------------------------------------------------------------------------------------------

Google Translate

Go to https://console.cloud.google.com/apis/dashboard
Create a Google Account
Create a new Project
Go to https://console.cloud.google.com/apis/credentials
Create a new API Key
Google Translate API is paid, but at the first stage, it gives a 300$ credit that you can use within 3 months.


Use to Google Translate Library Dependency

<dependency>
  	<groupId>com.google.cloud</groupId>
  	<artifactId>google-cloud-translate</artifactId>
  	<version>2.9.0</version>
</dependency>

How to get it running

Clone this GIT project.
Make sure this is a Maven project and Maven is executed to install the dependencies.
Add Opena AI api key and Google Translate api key to **application.properties** file in the project.
Launch it as a Spring Boot application.
Go to address in browser http://localhost:8080/

About

Image generator using Google Translate and DALL-E artificial intelligence, regardless of language according to the words entered

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published