Anime Image Generator - Workflow
1. Project Overview The Anime Image Generator allows users to generate anime-style images based on a text prompt. You can also upload your own image to transform it into an anime-style image resembling Ghibli art style.
2. Tech Stack Backend: Django (Python) Frontend: HTML, CSS, JavaScript API Integration: Hugging Face API for generating anime images Model Used: stabilityai/stable-diffusion-2-1 (Ghibli Style) Image Processing: Text-to-image
Setup Instructions (For Developers)
To get started with the project, follow these steps:
Step 1: Clone the Repository
First, clone the project repository to your local machine: bash: git clone https://github.com/your-username/anime-image-generator.git
Step 2: Create a Virtual Environment Create a virtual environment to install all dependencies without affecting your global environment: bash: cd anime-image-generator, python -m venv venv, Activate the virtual environment:
On Windows: bash: \venv\Scripts\activate
On macOS/Linux: bash: venv/bin/activate
Step 3: Set Up Hugging Face API Key You’ll need a Hugging Face API key to generate the images. You can get your key from Hugging Face, create an account, and get your API token.
Create a .env file in the project directory.
Add the following line in your .env file:
HUGGINGFACE_API_TOKEN=your-api-key
Step 4: Run the Django Development Server Start the Django development server to test the application:
bash: python manage.py runserver
. How the App Works (For Users)
Step 1: Visit the Home Page When you open the app, you'll land on the home page where you can see a form to input your text prompt or upload an image.
Step 2: Input Text Prompt You can enter a text prompt such as:
"A beautiful landscape in Ghibli style"
"Anime girl with a flowing dress in a forest"
When you click the Generate Image button, the backend will send the prompt to Hugging Face API to generate the anime-style image, which will then be displayed on the page.
Step 4: Image Generation Process Once the user submits the prompt or uploads an image:
A loading spinner will appear on the screen indicating the generation process is ongoing. After the model processes the request, the generated anime-style image will be displayed.
Step 5: Download Image Once the image is generated, users have the option to download the image in either PNG or JPG format. You can click the Download Image button to save the image to your device.
Log in or sign up for Devpost to join the conversation.