Skip to content

alienmind/electricdreams

Repository files navigation

electricdreams

Release Build status codecov Commit activity License

image info

Helper module and demo CLI to interact with ChatGPT and Stable Diffusion. Just for DIY small projects.

Current features:

  • Running queries against GPT from the command line
  • Exposing an API for text and image generation based on prompts
  • Demo: Generating an original text adventure - both from the command line or a notebook

This is pre-alpha. Expect bugs. Test coverage is zero.

Installation

You need to alocate your own API keys (OPENAI / Stable Diffusion) and put them under ~/.config/electricdreams/electric.env See config/electric.env.template for an example

Running from a Notebook in Google Colab

One possible setup is to expose an API in Google Colab, taking advantage of the GPU for image generation. There are examples for this under notebooks/electricdreams-jupyter-colab.ipynb

Running from the terminal

Another option is to run entirely in the terminal, but for now it will rely on a local GPU

API

Check http://localhost:8000 for a swagger

Building and local testing

This project uses poetry for dependency management, building and testing. Poetry can be installed with:

curl -sSL https://install.python-poetry.org | python3 -

Some commands:

poetry run electricdreams-cli         # Query from the command line (-h for help)
poetry run electricdreams-adventure   # Run a text adventure
poetry run electricdreams-api         # Expose an API - WIP

TODO

Create a web app that interacts with the API to create an adventure


Repository initiated with fpgmaas/cookiecutter-poetry.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published