Skip to content

Commit

Permalink
Update examples to fix py typecheck (API changed)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwillchen committed Dec 21, 2023
1 parent f37032d commit 563df89
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mesop/examples/docs/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def button_click(event: me.ClickEvent):
def main():
state = me.state(State)
if state.is_loading:
me.progress_spinner(mode="indeterminate", diameter=40, stroke_width=10)
me.progress_spinner()
me.text(state.data)
with me.button(on_click=button_click):
me.text("Call API")
2 changes: 1 addition & 1 deletion mesop/examples/playground.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,5 @@ def right_panel():
me.text("Output", style="font-weight: 500;")
state = me.state(State)
if state.is_loading:
me.progress_spinner(diameter=48, stroke_width=4, mode="indeterminate")
me.progress_spinner()
me.text(state.response)
4 changes: 2 additions & 2 deletions mesop/examples/playground_critic.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ def right_panel():
me.text("Output", style="font-weight: 500;")
state = me.state(State)
if state.initial_output.loading:
me.progress_spinner(diameter=48, stroke_width=4, mode="indeterminate")
me.progress_spinner()
me.text(state.initial_output.text)
if state.critic_output.loading:
me.progress_spinner(diameter=48, stroke_width=4, mode="indeterminate")
me.progress_spinner()
me.text(state.critic_output.text)

0 comments on commit 563df89

Please sign in to comment.