This project is a web application that generates descriptive captions for images. It utilizes OpenAI's GPT-4 Vision model to craft the captions.
- Upload an image and receive a unique, descriptive caption.
- Provide context or themes to guide the generation of your caption.
- The application respects user privacy. Images uploaded are not saved on our servers and are only used for caption generation.
- SvelteKit
- TypeScript
- Tailwind CSS
- OpenAI
- Clone the repository.
- Install the dependencies using
pnpm install
. - Create a
.env
file in the root directory and add your OpenAI API key asSECRET_OPENAI_API_KEY
. - Run the development server using
pnpm run dev
.
The package.json
file includes several scripts for development and deployment:
dev
: Starts the development server.build
: Builds the application for production.preview
: Previews the built application.test
: Runs end-to-end and unit tests.check
: Runs Svelte check and TypeScript sync.lint
: Runs Prettier and ESLint.format
: Formats the codebase using Prettier.
The project uses Playwright for end-to-end testing and Vitest for unit testing. Configuration for Playwright can be found in playwright.config.ts
and for Vitest in vite.config.ts
.
The main application code resides in the src
directory. Utility functions and shared components are located in the lib
directory. Server-side logic for handling requests is in the routes
directory.
Feedback and contributions are welcome! If you encounter a bug or have a suggestion, please open an issue. For contributions, feel free to make a pull request.