Inference pytorch model.pth stored on s3 bucket using app deployed on EC2 instance

0

Hi Dears,

I am building a web application to present my works in NLP projects, I have different torch models stored in the s3 bucket, Can I inference it in my EC2 instance? noting that I am using streamlit framework for the ec2 application.

The code below does not work!!

import boto3

s3 = boto3.resource('s3') s3_object = s3.Bucket('nlp-gpt-models').Object('mod_v1.pth').get() model_path = s3_object

Please help how can I communicate with the s3 bucket that has the models files. where is set up the IAM role and has access between s3 and EC2.

Thanks Basem

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠