labels extra fields not permitted

Hey, I am getting this error(labels extra fields not permitted) when using a custom recipe shown below.

But when I remove that "labels" key from the return statement the annotations are shown on server http://localhost:8080/ but all dependencies are in same color(light green).

My command was "python -m prodigy custom-dep data test.jsonl -F". I am using windows 10.
custom-dep was recipe. data was dataset. test.jsonl is source but it is not used. However I have provided information required. is the name of python file in which recipe was written.

Please help.

Hi! If you want to return "labels" to annotate by your custom recipe, those should go in the "config" dictionary returned by the recipe, not in the main components dictionary. This is also why you see the error message here.

Here's an example of a recipe returning a config with labels:

Yes I tried that and matter is resolved.

I want to show that block in between in my own html template for dependency parsing

Also, the lines showing dependencies are colliding. But when we use displacy in spacy library arcs do not collide. Can we correct it?