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.
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):
Bug fixing
Bob can fix simple bugs in code you executed. Just add %%fix
on top of the cell right after the error happened.
Code documentation
Using the %%doc
magic, you can generate documentation for a given code cell.
Example notebooks
- Basic demo
- Bio-image analysis workflow
- Choosing a model
- Documenting code
- Fixing bugs
- Graphical user interfaces
- Exploring tabular data
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.