Skip to content

Commit

Permalink
JupyterViz: Automatically deduce display name from model class
Browse files Browse the repository at this point in the history
  • Loading branch information
rht committed Jan 18, 2024
1 parent 877d552 commit 107d2a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mesa/experimental/jupyter_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def JupyterViz(
model_class,
model_params,
measures=None,
name="Mesa Model",
name=None,
agent_portrayal=None,
space_drawer="default",
play_interval=150,
Expand All @@ -35,6 +35,9 @@ def JupyterViz(
specify `space_drawer=False`
play_interval: play interval (default: 150)
"""
if name is None:
name = model_class.__name__

current_step = solara.use_reactive(0)

# 1. Set up model parameters
Expand Down

0 comments on commit 107d2a1

Please sign in to comment.