Skip to content

Commit

Permalink
Fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmasuch committed Aug 18, 2024
1 parent a578b74 commit db1ad07
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/custom_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ExampleModel(BaseModel):
with st.form(key="pydantic_form"):
data = sp.pydantic_input(key="my_custom_form_model", model=ExampleModel)
submit_button = st.form_submit_button(label="Submit")
obj = ExampleModel(data)
obj = ExampleModel.model_validate(data)

# if data:
# st.json(obj.model_dump())
if data:
st.json(obj.model_dump())

0 comments on commit db1ad07

Please sign in to comment.