Francesco-Sch / prompt-slam

Battle each other in an amazing prompt slam using the power of DALL-E.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README Header

The Prompt Slam Interface

Battle each other in an amazing prompt slam using the power of DALL-E.

A Prompt Slam (also known as a prompt battle) is an event format invented by Florian A. Schmidt and Sebastian Schmieg with design students from the HTW Dresden.

During a Prompt Slam people compete against each other using text-to-image AI models. The audience then chooses one of the contestants as a winner. For an independent Prompt Slam event series, hosted at HfK Bremen, this interface was developed.

You can read more about the original Prompt Slam here.

๐Ÿ“ Colophon

๐ŸŽฒ How to play

Gamemode: One vs. One

In this gamemode two contestants play against each other simultaneously. In the beginning they will both get an instruction on what they need to generate. They then have one minutes to simultaneously create a prompt. after that one minute is over, they both click 'Generate' to generate an image.

The crowd then decides which of the contestant has generated the better image and that constestant goes to the next round.

Other Gamemodes

Other gamemodes are currently developed and will be added to this repo in the future.

๐Ÿ’ป Use this interface

To use this interface you only need API access to the OpenAI API.

Replace YOUR_OPENAI_API_KEY in the .env.example file with your OpenAI API key. Then rename the .env.example to .env.

You can then either host the interface locally or deploy it to the hosting provider of your choice.

๐Ÿšง Development

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

๐Ÿ—๏ธ Build for production

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.

To start the production build use:

node build/index.js

This starts the interface as a node.js app.

๐Ÿณ Deploy with Docker

Using the Dockerfile or Docker Compose file in this repository, you can also run or deploy the app as a Docker container.

Make sure to add an OpenAPI Key to the .env file and adjust the ORIGIN variable before running the container.

Run with Docker Compose

To start the container with docker compose just run:

docker compose up -d

This will automatically build the image and start the container.

To stop the container you can run:

docker compose down

If you have made changes to the .env file you may want to rebuild the container:

docker compose up -d --build

Run with Dockerfile

First you need to build the image with the following command:

docker build . -t prompt-slam

Then start the created Docker image as a container.

docker run -d -p 3000:3000 prompt-slam

About

Battle each other in an amazing prompt slam using the power of DALL-E.


Languages

Language:Svelte 56.3%Language:CSS 17.9%Language:JavaScript 15.9%Language:TypeScript 5.6%Language:HTML 3.0%Language:Dockerfile 1.3%