ããã«ã¡ã¯ãPS課ã®å³¯ã§ãã
Amazon Sagemakerã§ã¯ã¦ã¼ã¶ã¼ãã¢ãã«ããã¬ã¼ãã³ã°ãã¦ãããã¤ããã ãã§ãªããAWS Marketplaceã§ãã¬ã¼ãã³ã°æ¸ã¿ã¢ãã«ãè³¼å ¥ããããã¤ãããã¨ãã§ãã¾ãã
SageMakerã®å·¦ä¸ããAWS Marketplaceã¸ã
ãã§ã«Amazon Sagemakerã«ãã§ãã¯ãå ¥ã£ã¦ãã¾ãã
ä»åã¯ãã¡ãã®ç¡æã®ãã¬ã¼ãã³ã°æ¸ã¿ã¢ãã«ã使ç¨ãã¾ãã æè©ãçæããã¢ãã«ã®ããã§ãã ãContinue to Subscribeããã¯ãªãã¯ãã¦é²ã¿ã¾ãã
説æãèªãã§ãAccept Offerããã¯ãªãã¯ãã¾ãããã®ã¢ãã«ã¯ml.c5.xlargeãã使ããªãããã§ããä»ã®ã¢ãã«ã§ãå©ç¨ã§ããã¤ã³ã¹ã¿ã³ã¹ã¿ã¤ããéããã¦ãããã®ãããã¾ããã¢ãã«èªä½ã¯ç¡æã§ãã¨ã³ããã¤ã³ããä½æããã¨ãã®ã¤ã³ã¹ã¿ã³ã¹ã¿ã¤ãåã®æéã¯ãããã®ã§æ³¨æãã¾ãããã
ãã¼ã·ã§ã³ãããªã¼ã¸ã§ã³ãé¸æãããView in SageMakherããã¯ãªãã¯ã
ããã¨SageMakerã®ã³ã³ã½ã¼ã«ã®æ¨è« > ã¢ãã«ããã±ã¼ã¸ > AWS Marketplaceã®ãµãã¹ã¯ãªãã·ã§ã³ã«è¿½å ããã¦ããã°OKã§ãã ãã¨ã¯ã¢ãã«ããã±ã¼ã¸ãé¸æããã¢ã¯ã·ã§ã³ããã¢ãã«/ã¨ã³ããã¤ã³ããä½æããã°äºæ¸¬ãè¡ãã¾ãã
ã¡ãªã¿ã«
ããã§ã¯ã¨ã³ããã¤ã³ãä½ææé ã¯çç¥ãã¾ããããlyric-generaterãã¨ããåã§ã¨ã³ããã¤ã³ãä½æå¾ã以ä¸ã®ããã«éãªæãã§äºæ¸¬ãè¡ã£ã¦ã¿ã¾ãã
import ast
import sagemaker
endpoint_name = "lyric-generater"
payload = bytes('''{"instances":[{"artist":"taylor swift","seed":"sagemaker"}]}''',encoding="utf-8")
predicter = sagemaker.predictor.RealTimePredictor(endpoint_name)
result_str = predicter.predict(payload).decode()
result = ast.literal_eval(result_str)
lyric = result['predictions'][0]['lyrics']
print(lyric)
ã¡ãªã¿ã«æè©ã¯ãããªæã...ï¼æå½¢ãã¦ããã¾ããï¼
Sagemaker
she walk around
she wanna be said
she can't have to say
her life is a city
and she want the world in the morning
its just she was a fool
she said she was crazy
she'll say how many times
she will never do the shadow
she said she says
but she was proud
nand she was shirting
come on and be something she could
she like it but she loves me
i got some shake and she don't
but she don't know about me
I can do it for you
she wants to be mad
can't you see that she can survive
i don't wanna know
i don't know if the same
{以ä¸ç¥}