You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,14 @@ uv pip install mofresh
17
17
18
18
The goal of this project is to offer a few tools that make it easy for you to refresh charts in marimo. This can be useful during a PyTorch training loop where you might want to update a chart on every iteration, but there are many other use-cases for this too.
19
19
20
+
### Widgets
21
+
22
+
The library provides three widgets:
23
+
24
+
1.**`ImageRefreshWidget`** - Displays images that can be updated dynamically. Perfect for refreshing matplotlib plots or any image content.
25
+
2.**`HTMLRefreshWidget`** - Renders HTML content that can be updated on the fly. Great for Altair charts, plotly visualizations, or custom HTML.
26
+
3.**`ProgressBar`** - A modern progress bar with dark mode support. Ideal for tracking training loops or long-running operations.
27
+
20
28
## How it works
21
29
22
30
The trick to get updating charts to work is to leverage [anywidget](https://anywidget.dev/). These widgets have a loop that is independant of the marimo cells which means that you can update a chart even if the cell hasn't completed running. The goal of this library is to make it easy to use this pattern by giving you a few utilities.
Copy file name to clipboardExpand all lines: demo.py
+33-2Lines changed: 33 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@
13
13
14
14
importmarimo
15
15
16
-
__generated_with="0.13.6"
16
+
__generated_with="0.17.0"
17
17
app=marimo.App(width="medium")
18
18
19
19
@@ -112,7 +112,7 @@ def _(mo):
112
112
113
113
This library can also deal with altair charts. This works by turning the chart into an SVG. This is a static representation that does not require any javascript to run, which means that we can apply a similar pattern as before!
114
114
115
-
> Due to a required dependency to convert the altair chart to SVG we cannot run the altair demo in WASM. This code will run just fine locally on your machine but currently breaks on the Github pages deployment.
115
+
> Due to a required dependency to convert the altair chart to SVG we cannot run the altair demo in WASM. This code will run just fine locally on your machine but currently breaks on the Github pages deployment.
0 commit comments