story-writer


Namestory-writer JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/haesleinhuepf/story-writer
SummaryA AI-based story writer Python library which uses OpenAI's chatGPT and Dall-E to generate PDFs with a story and a picture from a prompt and writes them into a PDF.
upload_time2023-12-02 21:16:54
maintainer
docs_urlNone
authorRobert Haase
requires_python>=3.9
licenseBSD-3-Clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Story writer

A AI-based story writer and Python library which uses OpenAI's [chatGPT](https://chat.openai.com/) and [Dall-E](https://openai.com/dall-e-2) to generate PDFs with a story and a picture from a prompt and writes them into a PDF.

<a href="https://github.com/haesleinhuepf/story-writer/blob/main/docs/images/teaser1.png"><img src="https://github.com/haesleinhuepf/story-writer/blob/main/docs/images/teaser1.png" width="240"/></a>
<a href="https://github.com/haesleinhuepf/story-writer/blob/main/docs/images/teaser2.png"><img src="https://github.com/haesleinhuepf/story-writer/blob/main/docs/images/teaser2.png" width="240"/></a>

## Usage: Streamlit app

You can try the streamlit app by installing [streamlit](https://streamlit.io/) and running this terminal command:

```commandline
story-writer
```

![img.png](https://github.com/haesleinhuepf/story-writer/blob/main/docs/images/streamlit_screenshot.png)


## Usage: Python

There is a high-level API available, which generates PDFs from prompts (e.g. the stories presented in the teaser above were produced using [this notebook](https://github.com/haesleinhuepf/story-writer/blob/main/docs/demo.ipynb)):

```python
from story_writer import generate_story
generate_story("cat_story.pdf", "a story about a cat that is walking on a street")
```

And there is a low-level API available, which generates a story and an image separately. 
You can learn more about the low-level API in [this notebook](https://github.com/haesleinhuepf/story-writer/blob/main/docs/story_building.ipynb).

## Installation

You can install story-writer using pip:

```commandline
pip install story-writer
```

You also need to create an OpenAI API Key and add it to your environment variables as explained on [this page](https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety).

## Development

If you want to contribute to `bia-bob`, you can install it in development mode like this:

```
git clone https://github.com/haesleinhuepf/story-writer.git
cd story-writer
pip install -e .
```

## Similar projects

* [Storyteller-core](https://github.com/jaketae/storyteller)

## Feedback welcome!

The `story-writer` is developed in the open because we believe in the open source community. Feel free to drop feedback as [github issue](https://github.com/haesleinhuepf/story-write/issues). Contributions are very welcome. 

## License

Distributed under the terms of the [BSD-3] license,
"story-writer" is free and open source software

[BSD-3]: http://opensource.org/licenses/BSD-3-Clause

## Acknowledgements


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/haesleinhuepf/story-writer",
    "name": "story-writer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "",
    "author": "Robert Haase",
    "author_email": "robert.haase@tu-dresden.de",
    "download_url": "https://files.pythonhosted.org/packages/00/ed/3580c7a59182c9ba73f05855f8424dd73e039a92bcbcb60333bf7bcbec8f/story-writer-0.1.1.tar.gz",
    "platform": null,
    "description": "# Story writer\r\n\r\nA AI-based story writer and Python library which uses OpenAI's [chatGPT](https://chat.openai.com/) and [Dall-E](https://openai.com/dall-e-2) to generate PDFs with a story and a picture from a prompt and writes them into a PDF.\r\n\r\n<a href=\"https://github.com/haesleinhuepf/story-writer/blob/main/docs/images/teaser1.png\"><img src=\"https://github.com/haesleinhuepf/story-writer/blob/main/docs/images/teaser1.png\" width=\"240\"/></a>\r\n<a href=\"https://github.com/haesleinhuepf/story-writer/blob/main/docs/images/teaser2.png\"><img src=\"https://github.com/haesleinhuepf/story-writer/blob/main/docs/images/teaser2.png\" width=\"240\"/></a>\r\n\r\n## Usage: Streamlit app\r\n\r\nYou can try the streamlit app by installing [streamlit](https://streamlit.io/) and running this terminal command:\r\n\r\n```commandline\r\nstory-writer\r\n```\r\n\r\n![img.png](https://github.com/haesleinhuepf/story-writer/blob/main/docs/images/streamlit_screenshot.png)\r\n\r\n\r\n## Usage: Python\r\n\r\nThere is a high-level API available, which generates PDFs from prompts (e.g. the stories presented in the teaser above were produced using [this notebook](https://github.com/haesleinhuepf/story-writer/blob/main/docs/demo.ipynb)):\r\n\r\n```python\r\nfrom story_writer import generate_story\r\ngenerate_story(\"cat_story.pdf\", \"a story about a cat that is walking on a street\")\r\n```\r\n\r\nAnd there is a low-level API available, which generates a story and an image separately. \r\nYou can learn more about the low-level API in [this notebook](https://github.com/haesleinhuepf/story-writer/blob/main/docs/story_building.ipynb).\r\n\r\n## Installation\r\n\r\nYou can install story-writer using pip:\r\n\r\n```commandline\r\npip install story-writer\r\n```\r\n\r\nYou also need to create an OpenAI API Key and add it to your environment variables as explained on [this page](https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety).\r\n\r\n## Development\r\n\r\nIf you want to contribute to `bia-bob`, you can install it in development mode like this:\r\n\r\n```\r\ngit clone https://github.com/haesleinhuepf/story-writer.git\r\ncd story-writer\r\npip install -e .\r\n```\r\n\r\n## Similar projects\r\n\r\n* [Storyteller-core](https://github.com/jaketae/storyteller)\r\n\r\n## Feedback welcome!\r\n\r\nThe `story-writer` is developed in the open because we believe in the open source community. Feel free to drop feedback as [github issue](https://github.com/haesleinhuepf/story-write/issues). Contributions are very welcome. \r\n\r\n## License\r\n\r\nDistributed under the terms of the [BSD-3] license,\r\n\"story-writer\" is free and open source software\r\n\r\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\r\n\r\n## Acknowledgements\r\n\r\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "A AI-based story writer Python library which uses OpenAI's chatGPT and Dall-E to generate PDFs with a story and a picture from a prompt and writes them into a PDF.",
    "version": "0.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/haesleinhuepf/story-writer/issues",
        "Documentation": "https://github.com/haesleinhuepf/story-writer#README.md",
        "Homepage": "https://github.com/haesleinhuepf/story-writer",
        "Source Code": "https://github.com/haesleinhuepf/story-writer",
        "User Support": "https://github.com/haesleinhuepf/story-writer/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ecf8f5cbe842f6e3eb3ba97c47654c1aea88ffc2410e23ab002db42010300fe",
                "md5": "80ef2a02c9109074759e4b1257e5a8ee",
                "sha256": "bcbdf10656f32417291431260757952957adee996de639f1099dd279fae0a9fb"
            },
            "downloads": -1,
            "filename": "story_writer-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "80ef2a02c9109074759e4b1257e5a8ee",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 9018,
            "upload_time": "2023-12-02T21:16:53",
            "upload_time_iso_8601": "2023-12-02T21:16:53.741206Z",
            "url": "https://files.pythonhosted.org/packages/0e/cf/8f5cbe842f6e3eb3ba97c47654c1aea88ffc2410e23ab002db42010300fe/story_writer-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "00ed3580c7a59182c9ba73f05855f8424dd73e039a92bcbcb60333bf7bcbec8f",
                "md5": "2f37f657a0b4ccbbb58b6e6fab900ba3",
                "sha256": "1ba1b72dba908d6b92788308f0e690e7201523a927887e78a63e004951c7e113"
            },
            "downloads": -1,
            "filename": "story-writer-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "2f37f657a0b4ccbbb58b6e6fab900ba3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 9021,
            "upload_time": "2023-12-02T21:16:54",
            "upload_time_iso_8601": "2023-12-02T21:16:54.861931Z",
            "url": "https://files.pythonhosted.org/packages/00/ed/3580c7a59182c9ba73f05855f8424dd73e039a92bcbcb60333bf7bcbec8f/story-writer-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-02 21:16:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "haesleinhuepf",
    "github_project": "story-writer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "story-writer"
}
        
Elapsed time: 7.30833s