@KishorKP Hello Kishor,
Thanks for your help. So i did some changes to my conf.json file. I ran the command: python3 server.py --ip $IP --port $PORT --url_root $URL_ROOT --config $CONFIG
and got the error:
Traceback (most recent call last):
File “server.py”, line 129, in
debug=args.debug)
File “server.py”, line 24, in start
translation_server.start(config_file)
File “/home/ng/open/OpenNMT-py-master/onmt/translate/translation_server.py”, line 81, in start
self.confs = json.load(f)
File “/usr/lib/python3.6/json/init.py”, line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File “/usr/lib/python3.6/json/init.py”, line 354, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.6/json/decoder.py”, line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.6/json/decoder.py”, line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 14 column 10 (char 339)
Any help in solving this error i will appreciate.
my conf.json file looks like this:
{
“models_root”: “./available_models”,
“models”: [
{
“id”: 100,
“model”: “kmt-model_step_100000.pt”,
“timeout”: 600,
“on_timeout”: “to_cpu”,
“load”: true,
“opt”: {
“gpu”: -1,
“beam_size”: 5
},
“tokenizer”: {
“type”: “pyonmttok”,
“mode”: “conservative”,
}
},{
“model”: “kmt-model_step_100000.pt”,
“timeout”: -1,
“on_timeout”: “unload”,
“model_root”: “./available_models”,
“opt”: {
“batch_size”: 1,
“beam_size”: 5
}
}
]
}