Hi,
Iām trying to run a text-generation model GPT2 on transformer-cli serve. I used below code
Creating API :
transformers-cli serve --task=text-generation --model=gpt2
Calling API:
curl -X POST http://localhost:8888/forward -H āaccept: application/jsonā -H āContent-Type: application/jsonā -d ā{āinputsā:āWhat is Deep Learningā,āparametersā:{āmax_new_tokensā:20}}ā
But Iām getting below error in the response. Looks like the API is expecting some specific input format.
{ādetailā:[{ātypeā:ājson_invalidā,ālocā:[ābodyā,0],āmsgā:āJSON decode errorā,āinputā:{},āctxā:{āerrorā:āExpecting valueā}}]}
Let me know what is the write format to call the text-generation API