Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jezbravo/text-2-img-vitejs
AI Text to Image Converter
https://github.com/jezbravo/text-2-img-vitejs
ai conversion converter huggingface images javascript stable-diffusion tailwindcss vercel vitejs
Last synced: about 14 hours ago
JSON representation
AI Text to Image Converter
- Host: GitHub
- URL: https://github.com/jezbravo/text-2-img-vitejs
- Owner: jezbravo
- Created: 2024-05-15T02:26:32.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-15T03:17:10.000Z (6 months ago)
- Last Synced: 2024-05-15T20:34:53.275Z (6 months ago)
- Topics: ai, conversion, converter, huggingface, images, javascript, stable-diffusion, tailwindcss, vercel, vitejs
- Language: JavaScript
- Homepage: https://text-2-img-vitejs.vercel.app
- Size: 175 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Text to Image Conversion
## Description
This is a very simple application that uses AI to convert the prompts entered by the user into images. This will be the next feature of the [Editia Project.](https://github.com/jezbravo/editia)
### Stack
- HTML
- Tailwind CSS
- JavaScript
- React (Vite JS)
- Hugging Face
- Stable Diffusion
- Vercel## Setup
First of all you must clone the repository:
```sh
git clone https://github.com/jezbravo/text-2-img-vitejs.git
cd text-2-img-vitejs
```Then install the dependencies:
```node
npm install
```### Environment Variables
In order for the program to work correctly, it is necessary to configure the following environment variables in an **.env** file at the root of the project:
```javascript
VITE_HF_TOKEN=
VITE_TXT_TO_IMG_MODEL=
```The **VITE_HF_TOKEN** is provided by the Hugging Face service, and the **VITE_TXT_TO_IMG_MODEL** is the name of the selected model. You can freely experiment with many to evaluate the results.
## Additional settings
### Image Adjustment
You can improve the quality of the images by editing the **negative_prompt** of the App.jsx file as desired.
Once everything is ready:
```javascript
npm run dev
```## Demo
Simply enter some text in the form field and press the "Generate" button. Wait a few seconds and your image will be ready.
You can test a deployed version at the following link: https://text-2-img-vitejs.vercel.app