output is too short

#3
by vijaymohan - opened

output it's producing too short

import sagemaker
from sagemaker.serializers import JSONSerializer
import json
predictor = sagemaker.Predictor(
'huggingface-pytorch-tgi-inference-2023-08-11-12-00-17-638',
serializer=JSONSerializer()
)
input_data = {
"inputs": "create a login api in dotnet mvc",
"max_length": 500
}
result = predictor.predict(input_data)
output = json.loads(result)
json.dumps(output, indent=4)

output : '[\n {\n "generated_text": "create flask login api\nfunc (a *App) login(c *gin.Context) {\n\tvar req"\n }\n]'

Sign up or log in to comment