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
To create an image with a **Medical NLP model** you must provide a license in one of the ways described by the [Authorization Flows Overview](https://nlp.johnsnowlabs.com/docs/en/jsl/install_advanced#authorization-flows-overview).
48
+
To create an image with a **Medical NLP Pretrained Pipeline** you must provide a license in one of the ways described by the [Authorization Flows Overview](https://nlp.johnsnowlabs.com/docs/en/jsl/install_advanced#authorization-flows-overview).
45
49
It will be stored in the container and used to pre-download licensed models & dependencies during the build proces.
46
50
```python
47
51
from johnsnowlabs import nlp
48
52
# In this example with authorize via a license.json file, but there are many other ways.
To create an image with a **Visual NLP model** you must provide a license in one of the ways described by the [Authorization Flows Overview](https://nlp.johnsnowlabs.com/docs/en/jsl/install_advanced#authorization-flows-overview).
63
+
To create an image with a **Visual NLP Pretrained Pipeline** you must provide a license in one of the ways described by the [Authorization Flows Overview](https://nlp.johnsnowlabs.com/docs/en/jsl/install_advanced#authorization-flows-overview).
56
64
It will be stored in the container and used to pre-download licensed models & dependencies during the build proces.
To create an image with a **custom pipeline** provide a fitted Spark Pipeline object as `custom_pipeline`.
76
+
If you use licensed annotators, provide a license in one of the ways described by the [Authorization Flows Overview](https://nlp.johnsnowlabs.com/docs/en/jsl/install_advanced#authorization-flows-overview).
77
+
```python
78
+
from johnsnowlabs import nlp
79
+
pipe =...# your custom pipeline which is already fitted
To create an image with a **NLU Pipeline** provide a fitted Spark Pipeline object as `custom_pipeline`.
87
+
If you use a licensed pipeline, provide a license in one of the ways described by the [Authorization Flows Overview](https://nlp.johnsnowlabs.com/docs/en/jsl/install_advanced#authorization-flows-overview).
Copy file name to clipboardExpand all lines: docs/en/jsl/snowflake_utils.md
+79-11Lines changed: 79 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ This will create the following resources:
44
44
- compute_pool_name=`tutorial_compute_pool`
45
45
46
46
You can specify a custom name for any resource by specifying it as a key-word argument.
47
+
Additionally, you can specify compute pool parameters with values defined in the [Snowflake Documentation](https://docs.snowflake.com/en/sql-reference/sql/create-compute-pool#required-parameters).
SELECT en_de_identify_clinical_pipeline_udf('The patient was prescribed Amlodopine Vallarta 10-320mg, Eviplera. The other patient is given Lescol 40 MG and Everolimus 1.5 mg tablet.');
Once you created an UDF in Snowflake you can access it within Streamlit Apps.
207
+
Once you created a UDF in Snowflake you can access it within Streamlit Apps.
171
208
Make sure to select the same resources to host your Streamlit app as used for hosting the UDF
172
209
173
210
This is a small example of a simple streamlit app you can now build:
174
211
1. Go to the Streamlit Section in `Projects` within you Snowflake account
175
212
3. In the bottom left click on your username and then on switch role and select the role we just created. The default value is `test_role`
176
-
3. In the side-bar, click on Streamlit and then on the `+ Streamlit App` button. Specify a Database, Schema and Warehouse. The defaults are `TUTORIAL_DB`, `DATA_SCHEMA`, `TUTORIAL_WAREHOUSE`.
213
+
3. In the sidebar, click on Streamlit and then on the `+ Streamlit App` button. Specify a Database, Schema and Warehouse. The defaults are `TUTORIAL_DB`, `DATA_SCHEMA`, `TUTORIAL_WAREHOUSE`.
177
214
Copy and paste the following script into your streamlit app and run it
For a more advanced streamlit example, see [here](https://github.com/JohnSnowLabs/johnsnowlabs/blob/main/streamlits/advanced_snowflake.py)
188
225
226
+
227
+
## Deploying Custom Pipeline as Snowflake Container Services UDF
228
+
To deploy a custom pipeline, simply provide a fitted Spark Pipeline object as `custom_pipeline`.
229
+
230
+
```python
231
+
# Either run `nlp.snowflake_common_setup` or manually create&specify these resources
0 commit comments