chanind / frame-semantic-transformer

Frame Semantic Parser based on T5 and FrameNet
https://chanind.github.io/frame-semantic-transformer
MIT License
51 stars 10 forks source link

Docker container does not return the result #21

Open neostrange opened 1 year ago

neostrange commented 1 year ago

Hi,

I have built and run the docker container but it does not work.

It give me the following output:

`~$ curl http://localhost:8888/detect-frames?sentence=i bought a new car

curl: (52) Empty reply from server

curl: (6) Could not resolve host: bought

curl: (6) Could not resolve host: a

curl: (6) Could not resolve host: new

curl: (6) Could not resolve host: car`

While for trying: curl http://localhost:8888/

It give me the following output: {"name":"Frame Semantic Transformer Demo"}

I am uncertain if I am making any mistakes.

chanind commented 1 year ago

I think the issue is that bash is trying to parse the parts of the URL and is messing up curl. Also the spaces aren't URL-encoded, although I'm not sure if that's important. Try running it as follows:

curl 'http://localhost:8888/detect-frames?sentence=i%20bought%20a%20new%20car'
neostrange commented 1 year ago

Hi @chanind, thanks for the response.

I tried using curl and wget both following your approach but it still giving no reply. Now instead of giving multiple responses from server, it gives only single response as below:

curl: (52) Empty reply from server

chanind commented 1 year ago

How much memory are you giving to docker? It's possible it's running out of memory running the model. You can try increasing the memory, or you can run the following to use the small model:

curl 'http://localhost:8888/detect-frames?model=small&sentence=i%20bought%20a%20new%20car'