# Generating Images from Chinese Text prompts using PaddleHub ERNIE-ViLG AI model

While most of the popular AI image generation AI tools focus on English prompts, not many are in other languages.

ERNIE-ViLG is AI text to image generation model that is trained specifically for Chinese text to image generation.

ERNIE-ViLG  is created by an organization called PaddlePaddle.

Table of Contents

*   [Using ERNIE-ViLG to generate images from Chinese text online](https://harishgarg.com/#Using_ERNIE-ViLG_to_generate_images_from_Chinese_text_online)
*   [Using ERNIE-ViLG in Google Colab Notebook](https://harishgarg.com/#Using_ERNIE-ViLG_in_Google_Colab_Notebook)
*   [PaddleHub ERNIE-ViLG Resources](https://harishgarg.com/#PaddleHub_ERNIE-ViLG_Resources)

Using ERNIE-ViLG to generate images from Chinese text online
------------------------------------------------------------

The easiest way to start using ERNIE-ViLG to generate images from Chinese text is by visiting their demo on [HuggingFace](https://huggingface.co/spaces/PaddlePaddle/ERNIE-ViLG).

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1729843593586/cfdecdfc-9d74-4246-87fb-1f6d7533556e.png)

Using ERNIE-ViLG in Google Colab Notebook
-----------------------------------------

You can also use ERNIE-ViLG in a Google Colab Notebook to generate images from Chinese text. Here are the steps:

*   Open [ERNIE-ViLG Google Colab Notebook](https://colab.research.google.com/drive/1z1Sy7HXWPY8R295tNA-UrFYLfnBe0okl#scrollTo=TuAWt2O9J4_s)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1729843595145/4f0d9a79-0483-4d8b-a721-eee824f5e5a3.png)

*   From the top menu bar choose Runtime -> Run All
*   It will launch a Gradio app inside the Google Colab that you can use to generate images from Chinese text

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1729843596573/10915951-ee4d-4951-9944-3c2bcd128882.jpeg)

*   Gradio App can be opened in a separate URL and shared with others for 72 hours.
*   You could also run ERNIE-ViLG locally on your machine by downloading this Colab Notebook and running it as Jupyter Notebook

PaddleHub ERNIE-ViLG Resources
------------------------------

The source code for ERNIE-ViLG is available [here](https://github.com/PaddlePaddle/PaddleHub/tree/develop/modules/image/text_to_image/ernie_vilg) and the Paper can be read [here](https://arxiv.org/abs/2112.15283)
