Explainable is a project for real time visualisation of complex data structures with minimal effort.
This project was created by Numan Team.
Visualisation runs on our website, so you only need install the library and initialise it in your code.
pip install -U explainable
- Install using
pip
- Import the library in your code
- Write a drawing function that returns a
Graph
object - Add
explainable.init(<draw_func>)
in your code to start the server - Add context using
explainable.add_context()
in your code - Go to https://explainable.numan.ai/
import time
import explainable
def draw(cm: explainable.ContextManager):
ctx = cm.get("my_var", default=0)
return explainable.Graph([
explainable.TextNode(f"My var: {ctx}"),
], edges=[])
explainable.init(draw)
explainable.add_context()
my_var = 1
while True:
my_var += 1
time.sleep(0.5)
Python 3.7 or higher.