Skip to main content

A Jupyter-based assistant for data analysis tasks

Project description

bia-bob

BIA bob is a Jupyter-based assistant for interacting with data using generated python code. It is based on OpenAI's API. You need an openai API account to use it.

img.png

Usage

You can initialize bob like this:

from bia_bob import bob

Code generation

You can ask Bob to generate code like this:

%bob Load blobs.tif and show it

It will then respond with a python code snippet that you can execute (see full example):

img.png

Bug fixing

Bob can fix simple bugs in code you executed. Just add %%fix on top of the cell right after the error happened.

img.png

Code documentation

Using the %%doc magic, you can generate documentation for a given code cell.

img.png

Example notebooks

Known issues

If you want to ask bob a question, you need to put a space before the ?.

%bob What do you know about blobs.tif ?

Installation

You can install bia-bob using pip. it is recommended to install it into via conda/mamba environment. If you have never used conda before, please read this guide first.

It is recommended to install bia-bob in a conda-environment together with useful tools for bio-image analysis.

mamba env create -f https://github.com/haesleinhuepf/bia-bob/raw/main/environment.yml

You can then activate this environment...

mamba activate bob_env

... and install bia-bob.

pip install bia-bob

Create an OpenAI API Key and add it to your environment variables as explained on this page.

Development

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

git clone https://github.com/haesleinhuepf/bia-bob.git
cd bia-bob
pip install -e .

Similar projects

There are similar projects:

Issues

If you encounter any problems or want to provide feedback or suggestions, please create a thread on image.sc along with a detailed description and tag @haesleinhuepf .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bia-bob-0.6.2.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bia_bob-0.6.2-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file bia-bob-0.6.2.tar.gz.

File metadata

  • Download URL: bia-bob-0.6.2.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for bia-bob-0.6.2.tar.gz
Algorithm Hash digest
SHA256 c781e44b0dc85b7e10b6b1d7631f1fd6733f9631aac19a30aa607e151cc99bad
MD5 f09b9b38fd448b3f29cc87eac5f73c73
BLAKE2b-256 cf8725b5f65eabc0b9b9eb784e184a1cf3826aed178eca95acfee02eb4b313b6

See more details on using hashes here.

File details

Details for the file bia_bob-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: bia_bob-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for bia_bob-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a4f173b6ece2e075c24bed888bb1d7b7cbe20e178a69d6dc0f7affc13a2c3fd2
MD5 6c08a93f61b5be081c839b0a377aa2fa
BLAKE2b-256 480952d03fbe447975ebab82049a84a62d1714454d91c9dd58a2a08e853ce24d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page