Skip to main content

futurephysics

futurephysics is a Python package that generates stories about future concepts that are not to far fetched, i.e. concepts should be possible to be implemented. It uses OpenAI's GPT-4, DALL-E models and Wikipedia to generate the story and corresponding images.

Background

It's great to have all these creative tools. One efficient way to use them is to create glorious visions of humanity's future, which will probably be powered by technology. I am a big fan of the Project Hieroglyph, an initiative of the University of Arizona. This initiative can be best explained by quoting from Wikipedia: "an initiative to create science fiction in order to spur innovation in science and technology." The goal of this repository and the easy-to-use Python package is to replicate this project but with generative AI and Wikipedia. I've also seen a few tweets where people tried to create visionary concepts with AI in Twitter threads:

Installation

You can install futurephysics from PyPI:

pip install futurephysics

Usage

Here's a basic example of how to use futurephysics:

from futurephysics import story

#Replace 'your-openai-api-key' with your actual OpenAI API key
openai_api_key = 'your-openai-api-key'

#Generate a story
html = story(openai_api_key)

The html variable contains the story formatted as HTML.

You can also provide your own list of three categories with which the story gets drafted:

from futurephysics import story

#Replace 'your-openai-api-key' with your actual OpenAI API key
openai_api_key = 'your-openai-api-key'

#Generate a story
html = story(openai_api_key, categories=["Computational archaeology", "Cosmogony", "Plants"])

The story is generated based on these categories.

Since the Dalle3 API is used, the returned image URLs expire after a while. You can provide details to your Google bucket for hosting images (the bucket needs to be public for this):

from futurephysics import story

#Replace 'your-openai-api-key' with your actual OpenAI API key
openai_api_key = 'your-openai-api-key'

#Generate a story
html = story(openai_api_key, google_id="your-google-id", google_bucket="your-google-id")

Examples

All stories which can be find on futurephysics.org were created by the library.

Contributing

If you run into any issues, the most helpful thing you can do is open an issue on GitHub. Thank you so much!

Roadmap

  • Improve image selection from Wikipedia
  • Improve image generation via DALL-E
  • Improve prompting

License

This project is licensed under the MIT License.

Metadata

Release files for futurephysics 0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for futurephysics 0.8
File Size Uploaded Provenance Actions
futurephysics-0.8.tar.gz 15.2 kB Without provenance Details for futurephysics-0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for futurephysics 0.8
File Interpreter ABI Platform Actions
futurephysics-0.8-py3-none-any.whl Python 3 none any Details for futurephysics-0.8-py3-none-any.whl

Total release size: 29.9 kB

Release files / futurephysics-0.8.tar.gz

Download URL futurephysics-0.8.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1d6c42786729c7822a9108b6da0dc5e5df80a7de5a7a6a31763d007d622bb7bc
BLAKE2b-256 checksum
How to use checksums
bd7892c03502dff63c3b36932fc6856fd48a21ad44049b70aacd95a93a626d04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / futurephysics-0.8-py3-none-any.whl

Download URL futurephysics-0.8-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c9654d25ab224ec222df7b029374d52a47258f18c6a53a7b604052dc6dba96a
BLAKE2b-256 checksum
How to use checksums
c1ff03cc675d7eb0b59df16ae2c0761ff06c609f2dcd717e40836658d4809988
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for futurephysics 0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page