I have searched and searched. I was able to find this git repository that puts a thinc model as a relationship extractor pipeline in spacy. I need to add my NER model which is implemented using Tensorflow as a Spacy pipeline and I don't know what is the difference between adding a custom model implemented using thinc and with TensorFlow?
Just to clarify: the repository you linked does not showcase a Pytorch model for relation extraction in spaCy - in fact it uses the ML library Thinc to implement the model. You can find more details on that in the corresponding video tutorial.
The key point to remember is that spaCy works with Thinc models under the hood, but Thinc provides wrappers for Pytorch and Tensorflow.
To use those in spaCy, you can follow the documentation here. In a nutshell, you should be able to do something like this:
from thinc.api import TensorFlowWrapper
wrapped_model = TensorFlowWrapper(your_tf_model)
The wrapped_model
will now be a Thinc
model that you can use to power your (custom) trainable pipeline component.