Coding🔮
Last updated
Last updated
We know many of you knows Python coding from heart, and we know AI is not perfect by a long shot.
Thus we provide a full Python editing experience right along with our AI experience for any tweaking needed.
There're 2 places that you can write/modify code:
After running for the first time, you'll see all the code generated is accessible via "Code" button on tool bar.
You can change the code as you wish but be aware:
Modify code does not sync back to original prompt
Modify of the prompt will regenerate entire code again, removing any changes you make
So it's best to modify this code for small bugs or behaviors that is not specified in your prompt.
Several code section worth explaining and noticed during your modification:
Bayeslab automatically generates code to install and reference required libraries for each block. If package already exists, it will just continue.
Please do not remove since each block might be executed individually without previous block.
Bayeslab uses display function to transfer chart option/data to frontend. Currently only plotly charts are supported.
The final part of code shows a try-except section with displayVariable function. This is AI generated for particular variable be shown as "Result" and can be referenced in other block again.
Please do not change/remove. You can change the variable name string though.
Code block is just like a normal Jupyter code cell, it contains python code and execute, displaying result under this block.
Use this block if you got ready to use python code , or feel more comfortable start coding from scratch.