Skip to content

SHLapi/AI-Image-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Image Generator

A simple, user-friendly AI image generator built with HTML, CSS, and JavaScript. This project allows users to generate images from a text prompt using various AI models from Hugging Face.

Features

Text-to-Image Generation: Type a text prompt to create unique images.

Multiple Models: Choose from different AI models, including Stable Diffusion, FLUX, and Openjourney.

Random Prompts: Get inspired with a built-in dice button that suggests random prompts.

Customizable Output: Select the number of images to generate and choose from different aspect ratios (1:1, 16:9, 9:16).

Download Images: Easily download your generated images.

Getting Started

Prerequisites

You need a Hugging Face API key to use this application.

Sign up for an account on Hugging Face.

Go to your profile settings and find the Access Tokens section.

Create a new token with at least Read access.

Copy your new token.

Installation

Clone this repository to your local machine:

git clone https://github.com/SHLapi/AI-Image-Generator.git

Navigate to the project directory:

cd AI-Image-Generator

Open the app.js file and replace the placeholder with your Hugging Face API key.

const API_KEY = 'your_api_key_here'; // Replace with your actual API key

Usage

Simply open the index.html file in your web browser. The application is a single-page app and does not require a server to run.

Project Structure

index.html: The main HTML file that provides the user interface.

styles.css: The CSS file for styling the application.

app.js: The JavaScript file that handles the logic, including user interactions and API calls to Hugging Face.

About

Image generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors