Web Extract Worker
Introduction
The web-based extract text to image worker :).
Installation
- Firstly, clone or fork this repository.
- Second, please refer the Cloudflare Pages Docs to complete the front-end page deployment.
In our web service, we can fill the prompt and generate image with one of the text-to-image worker AI model randomly.
The user scenario image is as folows:
Our front-end worker is deployed at the Cloudflare Pages.
Firstly, open the web page and browse the above link:
Input the corgi
to be the prompt and click "Generate" button:
After waiting for about whiles, it will present generated image:
You're done for our web service tutorial now!
Our source code is available here:
The web-based extract text to image worker :).
And our techniques are as follows:
index.html
is the main page to let users input their prompts and see generated image.extract.php
is the main PHP program to handle user prompt and respond generated image.We used these following models and the PHP program will choose them randomly when retrieving user prompts:
It's the dead simple for PHP developers to learn how to use the native PHP codes to develop a extract text to image service via the Cloudflare worker AI models :).