macanv / BERT-BiLSTM-CRF-NER

Tensorflow solution of NER task Using BiLSTM-CRF model with Google BERT Fine-tuning And private Server services
https://github.com/macanv/BERT-BiLSMT-CRF-NER
4.67k stars 1.25k forks source link

HTTP请求预测时报错:not enough values to unpack (expected 4, got 2) #372

Open ACRONYMxFYQ opened 3 years ago

ACRONYMxFYQ commented 3 years ago

用postman调用 xxxx:5555/encode的时候 postbody写的是: { "id":1, "texts":["1月24日,新华社对外发布了中央对雄安新区的指导意见“], "is_tokenized":false }

ACRONYMxFYQ commented 3 years ago

就算用也是一样 { "id":1, "texts":["1月24日,新华社对外发布了中央对雄安新区的指导意见“], "is_tokenized":false "mode":"NER“ }

ACRONYMxFYQ commented 3 years ago

是我请求的内容哪里不对吗 我印象中这个方法我曾经请求成功过

ACRONYMxFYQ commented 3 years ago

问题解决了 启动参数带上 -http_port=8125 然后http请求的时候 请求这个端口就好。需要在anaconda上pip install bert-serving-server[http]