File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -730,19 +730,21 @@ You can deploy a built-in algorithm or pretrained model to a SageMaker endpoint
730
730
731
731
First, find the model ID for the model of your choice in the :doc: `Built-in Algorithms with pre-trained Model Table<./doc_utils/pretrainedmodels> `.
732
732
733
- Then, using the model ID, define your model as a JumpStart model. Use the `deploy ` method to automatically deploy your model for inference.
733
+ Then, using the model ID, define your model as a JumpStart model. Use the `` deploy ` ` method to automatically deploy your model for inference.
734
734
In this example, we use the EQA (extractive question answering) BERT base model (cased) from HuggingFace.
735
735
736
736
.. code :: python
737
737
738
738
from sagemaker.jumpstart.model import JumpStartModel
739
+
739
740
model_id = " huggingface-eqa-bert-base-cased"
740
741
my_model = JumpStartModel(model_id = model_id)
741
742
predictor = my_model.deploy()
742
743
743
- You can then run inference with the deployed model using the `predict ` method.
744
+ You can then run inference with the deployed model using the ``predict `` method.
745
+
744
746
.. code :: python
745
-
747
+
746
748
question = " What is Southern California often abbreviated as?"
747
749
response = predictor.predict(question)
748
750
print (response)
You can’t perform that action at this time.
0 commit comments