Zungu's picture

Zungu

Theguys808
ยท

AI & ML interests

import json import sagemaker import boto3 from sagemaker.huggingface import HuggingFaceModel, get_huggingface_llm_image_uri try: role = sagemaker.get_execution_role() except ValueError: iam = boto3.client('iam') role = iam.get_role(RoleName='sagemaker_execution_role')['Role']['Arn'] # Hub Model configuration. https://huggingface.co/models hub = { 'HF_MODEL_ID':'intfloat/multilingual-e5-small' } # create Hugging Face Model Class huggingface_model = HuggingFaceModel( image_uri=get_huggingface_llm_image_uri("huggingface-tei",version="1.2.3"), env=hub, role=role, ) # deploy model to SageMaker Inference predictor = huggingface_model.deploy( initial_instance_count=1, instance_type="ml.g5.2xlarge", ) # send request predictor.predict({ "inputs": "My name is Clara and I am", })

Recent Activity

updated a model 5 days ago
Theguys808/WalkNam
published a model 5 days ago
Theguys808/WalkNam
View all activity

Organizations

Walk'nam 's profile picture

datasets

None public yet