How to execute code that was generated by the solara chatbot?
I was already able to extract the code block that was returned from the chat interface.
Now I want to execute that code and show the result in a solara component.
Is there an easy way to directly execute this new code?
Thanks for any advice on this!

7 Replies
for reference, here's my notebook
oh no, there also seems to be an issue with the formating in the chatbot when it comes to code blocks.

intersting, now I tried it again, and cannot reproduce this bug.
Maybe a ChatGPT mistake
OK, solved it myself like this:
Whow, nice 🙂
Will you let it re-write its own app?
or you can write to gen.py, run
import gen
and call gen.Page()
(and to remove it, use del sys.modules['gen']
I'll soon share more about my idea! 🙂
thanks for this idea!
ahhh, solara markdown supports images, that's amazing!
