Skip to content

Commit b01ed76

Browse files
committed
Update text-generator
1 parent 4033fb0 commit b01ed76

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

examples/text-generator/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ The model requires encoded data for inference, but the API should accept strings
2828
2929
```python
3030
from encoder import get_encoder
31-
3231
encoder = get_encoder()
3332

3433

@@ -39,7 +38,7 @@ def pre_inference(sample, metadata):
3938

4039
def post_inference(prediction, metadata):
4140
response = prediction["sample"]
42-
return {encoder.decode(response)}
41+
return encoder.decode(response)
4342
```
4443
4544
## Deploy to AWS

examples/text-generator/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ def pre_inference(sample, metadata):
1010

1111
def post_inference(prediction, metadata):
1212
response = prediction["sample"]
13-
return {encoder.decode(response)}
13+
return encoder.decode(response)

0 commit comments

Comments
 (0)