GPT Image Captioner is a web app that generates high-quality image captions using the OpenAI API. Designed for users who want to streamline dataset preparation, it's especially useful for those working with LoRA model training platforms like fal LoRA Trainer and Replicate LoRA Trainer.
Try it live at GPT Image Captioner!
- Image Captioning: Upload images to generate detailed captions.
- Customizable Captions: Add prefix and suffix options to tailor captions.
- Batch Processing: Supports multiple image uploads with real-time progress.
- Downloadable Captions: Get all captions as a ZIP file.
- API Key Management: Securely store and manage your OpenAI API key within the app.
- Framework: Next.js 14
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Icons: Lucide React
- API Integration: OpenAI API
- Node.js (v16 or higher)
- Yarn package manager
- OpenAI API key (optional for development, can also be added within the app)
-
Clone the repository:
git clone https://github.com/aleksa-codes/gpt-flux-img-captioner.git cd gpt-image-captioner
-
Install dependencies:
yarn install
-
Create a
.env
file to add your OpenAI API key (optional; the key can also be added in-app):OPENAI_API_KEY=your-api-key
-
Start the development server:
yarn dev
-
Open http://localhost:3000 in your browser to view the app.
- Upload Images: Add one or multiple images to generate captions.
- Customize Captions: Optionally add a prefix and/or suffix for caption styling.
- Generate Captions: Click "Generate Captions" to process images.
- Download Captions: Once generated, download all captions as a ZIP file.
- Use the in-app API Key Manager to securely store your OpenAI API key in local storage.
- This key enables seamless interaction with the OpenAI API.
- You can add, update, or remove the key as needed.
Contributions are welcome! Here’s how to get involved:
- Fork the repository.
- Create your feature branch:
git checkout -b feature/AmazingFeature
. - Commit your changes:
git commit -m 'Add AmazingFeature'
. - Push to the branch:
git push origin feature/AmazingFeature
. - Open a Pull Request.
- Follow the existing code style and conventions.
- Write meaningful commit messages.
- Test changes thoroughly and update documentation as needed.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by aleksa.codes