Jan-Hendrik Müller
Jan-Hendrik Müller
Explore posts from servers
SSolara
Created by MaartenBreddels on 10/16/2024 in #general
uv+solara
yep! Quite magical things are happening with uv right now! These are 3 other useful ones:
uvx --with anywidget jupyter lab
uvx --with anywidget jupyter lab
uvx --with solara jupyter lab
uvx --with solara jupyter lab
uvx marimo edit hi.py --sandbox
uvx marimo edit hi.py --sandbox
1 replies
SSolara
Created by Jan-Hendrik Müller on 9/29/2024 in #questions-issues
How to execute code that was generated by the solara chatbot?
No description
13 replies
SSolara
Created by Jan-Hendrik Müller on 9/29/2024 in #questions-issues
How to execute code that was generated by the solara chatbot?
ahhh, solara markdown supports images, that's amazing!
import solara

# Define the Markdown content with the base64 image
markdown_content = """
**Hello**

![example](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==)
"""

# Solara app component
@solara.component
def Page():
solara.Markdown(markdown_content)

# Run the app
Page()
import solara

# Define the Markdown content with the base64 image
markdown_content = """
**Hello**

![example](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==)
"""

# Solara app component
@solara.component
def Page():
solara.Markdown(markdown_content)

# Run the app
Page()
13 replies
SSolara
Created by Jan-Hendrik Müller on 9/29/2024 in #questions-issues
How to execute code that was generated by the solara chatbot?
thanks for this idea!
13 replies
SSolara
Created by Jan-Hendrik Müller on 9/29/2024 in #questions-issues
How to execute code that was generated by the solara chatbot?
I'll soon share more about my idea! 🙂
13 replies
SSolara
Created by Jan-Hendrik Müller on 9/29/2024 in #questions-issues
How to execute code that was generated by the solara chatbot?
13 replies
SSolara
Created by Jan-Hendrik Müller on 9/29/2024 in #questions-issues
How to execute code that was generated by the solara chatbot?
OK, solved it myself like this:
13 replies
SSolara
Created by Jan-Hendrik Müller on 9/29/2024 in #questions-issues
How to execute code that was generated by the solara chatbot?
intersting, now I tried it again, and cannot reproduce this bug. Maybe a ChatGPT mistake
13 replies
SSolara
Created by Jan-Hendrik Müller on 9/29/2024 in #questions-issues
How to execute code that was generated by the solara chatbot?
No description
13 replies
SSolara
Created by Jan-Hendrik Müller on 9/29/2024 in #questions-issues
How to execute code that was generated by the solara chatbot?
for reference, here's my notebook
13 replies
SSolara
Created by Jan-Hendrik Müller on 8/8/2024 in #questions-issues
How to make `slider.value` reactive?
5 replies
SSolara
Created by Jan-Hendrik Müller on 8/8/2024 in #questions-issues
How to make `slider.value` reactive?
Awesome, that works! 🎉
import solara
from matplotlib.figure import Figure
import numpy as np

@solara.component
def Page():
fig = Figure()
ax = fig.subplots()
max_x = solara.use_trait_observe(slider, "value")
x = np.linspace(0, max_x, 100)
y = np.sin(x)
ax.scatter(x, y, color="green")
return solara.FigureMatplotlib(fig)
Page()
import solara
from matplotlib.figure import Figure
import numpy as np

@solara.component
def Page():
fig = Figure()
ax = fig.subplots()
max_x = solara.use_trait_observe(slider, "value")
x = np.linspace(0, max_x, 100)
y = np.sin(x)
ax.scatter(x, y, color="green")
return solara.FigureMatplotlib(fig)
Page()
5 replies
SSolara
Created by Jan-Hendrik Müller on 10/4/2023 in #general
Blender with Solara
also not that important⏳ And another thought: ipyMolecularNodes is a proof of concept that blender models can be turned into notebooks for the scientific python visualization workflow. That means that for every blender model ever created, and all future models that will be created, this is theoretically possible as well. With solara, these notebooks can then even be turned into standalone-zero-install web apps. I don't know yet where this can be of practical use, but I see huge potential for this pipeline!
28 replies
SSolara
Created by Jan-Hendrik Müller on 10/4/2023 in #general
Blender with Solara
I've just tested your snippet, what a cute surprise 🐱✨ Very useful indeed! Is there also a way to show a progress bar to run from 0 to 2 seconds? All renderings will approx. take the same time, so that would give the user even a better estimate how to long to wait.
28 replies
SSolara
Created by Jan-Hendrik Müller on 10/4/2023 in #general
Blender with Solara
python3.10 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
solara run ./pages
python3.10 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
solara run ./pages
should work
28 replies
SSolara
Created by Jan-Hendrik Müller on 10/4/2023 in #general
Blender with Solara
oh yes, it runs only on python3.10
28 replies
SSolara
Created by Jan-Hendrik Müller on 10/4/2023 in #general
Blender with Solara
No description
28 replies
SSolara
Created by Jan-Hendrik Müller on 10/4/2023 in #general
Blender with Solara
Hi @MaartenBreddels, the issue is solved now and was related to bpy context handling, the full conversation that solved this issue is here: https://github.com/radames/Gradio-Blender-bpy/issues/1 I've now hosted a solara app on huggingface (code is only a very quick write-up, nothing too pretty): https://huggingface.co/spaces/kolibril13/solara-bpy The solara app is very performant when I run it on my MAC M1 (rendering the molecule takes only 1 second). Rendering on the huggingface free plan is a bit slower, takes 40 seconds. Here's a screenshot:
28 replies