Eden AI is provides 100 free use of text to image generator.
You can claim your apiKey by going to the following link:-
https://www.edenai.co/feature/image-generation-apis
Create two endpoints one with the homepage and the other which serves the json format
containing the urls of the image generated.
Create the templates folder and design the web app according to your wish and will.
Use the fetch method in the javascript and write the basic javascript.
Install all the files in requirements.txt and then type python main.py in your terminal. Also the apiKey is necessary