Electra-base-sentence-splitter

image

Hello,

I am trying to use Electra sentence Splitter model. However when i try to import the transformers.modeling_tf_electra by

from transformers.modeling_tf_electra import TFElectraMainLayer

it gives an error. I tried to search for it but to no avail, I need to import the TFElectraMainLayer to proceed forward. Any idea how to do that?

Attaching image for convinence

Hey @Saad20x, it seems you’re using code that was working with a previous version of transformers. What is your current transformers version?

The organization has changed in 3.5.x, please do the following to import the main layer:

from transformers.models.electra.modeling_tf_electra import TFElectraMainLayer

@lysandre Thank you for the prompt reply, it worked.

Just one more question, I was using this to split sentences, but it is showing that task isn’t supported? which is the appropriate one?

Thank you & Best Regards

Hey @Saad20x, could you expand on what you’re trying to do with sentence splitting? As far as I’m aware, we don’t have such a pipeline?

@lysandre

Basically, I am trying to do aspect based sentiment analysis. Like there are certain sentences that have multiple sentences. I was doing some research and found this model,

I think this is a pre-tained model that splits sentences.

Is this appropriate?

Best,