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

回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ