Building a Textual Data Understanding Model for Contextual Question-Answering

0

"I have textual data and I want to build a model that understands all the information, so that when I ask any question, it can reply accordingly."

predictor = model1.deploy(initial_instance_count=1, instance_type="ml.p3.2xlarge")

import json

Prepare the question you want to ask

question = "What is the age of the patient?"

Convert the question to JSON format (if needed by your model)

question_input = json.dumps({"question": question})

Perform inference using the deployed predictor

answer_result = predictor.predict(question_input)

Parse and display the answer

parsed_answer = json.loads(answer_result) answer = parsed_answer["answer"] print("Answer:", answer)

                                             ----This is Errors---

ModelError: An error occurred (ModelError) when calling the InvokeEndpoint operation: Received server error (0) from primary with message "Your invocation timed out while waiting for a response from container primary. Review the latency metrics for each container in Amazon CloudWatch, resolve the issue, and try again.". See https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#logEventViewer:group=/aws/sagemaker/Endpoints/pytorch-inference-2023-08-10-12-34-42-075 in account 962041679118 for more information.

rahul
질문됨 9달 전48회 조회
답변 없음

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

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

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

관련 콘텐츠