Giter Club home page Giter Club logo

fableforge's Introduction

📚 FableForge

📄 Description

Generate a picture book from a single prompt using OpenAI's new function calling and Replicate's API for Stable Diffusion. Store all your generated images and corresponding prompts in Deep Lake. Check example.pdf or watch the video below for a peek at the output.

Built with LangChain, Deep Lake, and Replicate.

📺 Demo

fableforge_demo.mp4

🛠 Install

  1. Clone the repository
  2. Install requirements.txt
  3. Set up your OpenAI and Replicate API keys in keys.env - More on this below
  4. To save your images and prompts, set up your Activeloop Deep Lake token and dataset path in keys.env - More on this below
  5. Run streamlit run main.py to start the app!

🧠 Deep Lake Setup

During the creation of this project, I used Deep Lake to store the generated pictures and prompts in the cloud, as it makes it easy to work with multiple modalities of data (image/text), and displays them in a web UI. To set this up yourself, go to the Deep Lake website and make an account. Once logged in, you can click "Train deep learning models", then "Create dataset", which will guide you through getting an API token and dataset link. Put the token and dataset path in the keys.env file and you're good to go.

🖼️ Replicate Setup

A Replicate API key is necessary for this app. To get one, go to the Replicate website and create an account, then take your API key and put it in keys.env. Replicate provides free image generation for new users.

📐Architecture

architecture

Improvements

  • This demo uses Replicate for image generation due to its ease of use. Connect it to your own Stable Diffusion setup (local or cloud-based) for better results. I recommend some combination of Diffusers and FastAPI as a starting point.

License

MIT License

fableforge's People

Contributors

e-johnstonn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.