article-image-generator
Article image generator is a web application that generates headline images for articles. It's build on GPT-3.5, Stable diffusion XL 2.2.2 and our custom model for image validation. The application is built with Svelte and FastAPI.
Table of contents
About
The project was created by students of the Secondary Industrial School Brno, Purkyňova under the guidance of AI Check on internship
The project is open to all and free of charge.
Technologies
- Frontend: Svelte – Svelte is a modern JavaScript framework that enables the development of interactive user interfaces
- Backend: FastAPI – FastAPI is a powerful Python framework for building web applications.
AI Models
- Image generation: Stable diffusion XL 2.2.2 – Stable diffusion XL 2.2.2 is an advanced AI model specifically designed for generating high-quality images
- Text processing: gpt-35-turbo – cutting-edge text processing model developed by OpenAI
Requirements
- Python 3.9.2 – Python serves as the primary programming language for the backend implementation.
- NodeJS 18.16.0 LTS – NodeJS is essential for running the Svelte frontend and managing the necessary dependencies.
Project preview
Application design
Example:
How Important Is Web3 and Decentralization to Industry Ecosystems?
Getting Started
- Create Python virtual enviroment (optional, but will prevent some unexpected errors)
python -m venv pyaig
# Windows
pyaig\Scripts\activate
pip install -r requirements.txt
# Linux
source pyaig/bin/activate
pip install -r requirements.txt
- Get all svelte packages
cd ./frontend
npm install
cd ../
- Create .env file and fill it with your API keys
OPENAI_API_KEY=<your key>
OPENAI_API_ENGINE=<your engine>
OPENAI_API_ENGINE_EMBEDDING=<your engine>
OPENAI_CUSTOM_DOMAIN=<your domain>
STABILITY_API_KEY=<your key>
- Build svelte and run fastapi
cd ./frontend
npm run build
cd ../
python -m article_image_generator.main
- When first build is done, just run the python file
- When first build is done, just run the python file
- don't forget to be in virtual enviroment
python -m article_image_generator.main
Optional
5. In article_image_generator.settings you can change settings of all aspects of project
Current style presets:
- realistic
- cinematic
- cartoon
- sketch