Skip to content

Commit b6a5b31

Browse files
authored
fix code snippet for invoking model in streamlit
1 parent ad7c26b commit b6a5b31

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

streamlit/views/ml_serving_invoke.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,17 @@
7474
"code": """
7575
```python
7676
from databricks.sdk import WorkspaceClient
77+
from databricks.sdk.service.serving import DataframeSplitInput
7778
import streamlit as st
7879
7980
w = WorkspaceClient()
8081
8182
response = w.serving_endpoints.query(
8283
name="custom-regression-model",
83-
dataframe_split={
84+
dataframe_split=DataframeSplitInput.from_dict({
8485
"columns": ["feature1", "feature2"],
8586
"data": [[1.5, 2.5]]
86-
}
87+
})
8788
)
8889
st.json(response.as_dict())
8990
```

0 commit comments

Comments
 (0)