Overview
The Prompt Slam Interface is a platform for hosting prompt battles, where participants compete against each other using text-to-image AI models. Developed for an independent Prompt Slam event series hosted at HfK Bremen, the interface allows contestants to generate images based on given prompts within a time limit. The audience then chooses the winner. The interface requires API access to the OpenAI API for functionality.
Features
- Gamemode: One vs. One: Two contestants play against each other simultaneously, creating prompts within a given time limit.
- Prompt Generation: Contestants generate prompts based on given instructions.
- Image Generation: Participants generate images based on their prompts.
- Crowd Judging: The audience determines the winner by deciding which contestant has generated the better image.
Installation
- Replace
YOUR_OPENAI_API_KEYin the.env.examplefile with your OpenAI API key. - Rename the
.env.examplefile to.env. - Host the interface locally or deploy it to the hosting provider of your choice.
To start the development server after installing dependencies with npm install, pnpm install, or yarn:
npm run dev
To create a production version of the app:
npm run build
To preview the production build:
npm run preview
To start the production build as a node.js app:
npm start
To deploy the app as a Docker container:
- Build the Docker image, ensuring you have added an OpenAPI Key to the
.envfile and adjusted theORIGINvariable. - Start the created Docker image as a container.
Summary
The Prompt Slam Interface is a platform for hosting prompt battles that utilize text-to-image AI models. With features such as prompt and image generation, crowd judging, and multiple game modes, it offers an engaging experience for participants and audience members. The installation process is straightforward, requiring API access to the OpenAI API and basic server deployment knowledge. Overall, the Prompt Slam Interface provides a fun and interactive way to showcase the capabilities of AI technology in a competitive setting.