Skip to content

Commit eda71fe

Browse files
committed
update summary func
1 parent 67abfec commit eda71fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fm_create_summary.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def lambda_handler(event, context):
1919
CONTENT_TYPE = "application/json"
2020

2121
payload = {
22-
"text_inputs": prompt,
22+
"inputs": prompt,
2323
"max_length": MAX_LENGTH,
2424
"num_return_sequences": NUM_RETURN_SEQUENCES,
2525
"top_k": TOP_K,
@@ -35,7 +35,7 @@ def lambda_handler(event, context):
3535
EndpointName=endpoint_name, ContentType=CONTENT_TYPE, Body=payload
3636
)
3737
model_predictions = json.loads(response["Body"].read())
38-
generated_text = model_predictions["generated_texts"][0]
38+
generated_text = model_predictions[0]["generated_text"]
3939
print(f"Response: {generated_text}")
4040

4141
resp = json.dumps({"text": generated_text})

0 commit comments

Comments
 (0)