This project is a local language text-to-image generator that allows users to generate images based on text prompts in Yoruba or French languages. It utilizes the Google Translate API to translate the prompts to English and then generates images using the Dall-E 3 model.
- Select input language: Choose between Yoruba and French languages for the text prompt.
- Text prompt: Enter a text prompt in the selected language to generate an image.
- Image generation: The application translates the prompt to English using the Google Translate API and generates an image using the Dall-E 3 model.
- Display result: The generated image is displayed in the application.
To get started with this project, follow these steps:
- Create an account on Windmill
- Create a new app
- Include select input, text input, button and Image components
- Add the comtents of
inline_script.py
into the inline script of the button - Set up environment variables
- Test
- Create a Windmill account
- Copy the contents of the
hub_compatible_json.json
file - Click on Import from JSON
- Paste the
hub_compatible_json.json
- Test
- Select the desired input language (Yoruba or French) from the dropdown menu.
- Enter a text prompt in the selected language in the text input field.
- Click the "Press me" button to initiate the image generation process.
- The generated image will be displayed in the application.
The application follows these steps to generate images from local language text prompts:
- The user selects the input language (Yoruba or French) and enters a text prompt.
- When the "Generate Image" button is clicked, the application sends the selected language and text prompt to the backend.
- The backend uses the Google Translate API to translate the text prompt from the selected language to English.
- The translated English prompt is then passed to the Dall-E 3 model to generate an image.
- The generated image URL is returned to the frontend and displayed in the application.
Contributions to this project are welcome! Contribute to Bluewind