Closed Laurengcy closed 3 years ago
Experiencing the same issue when trying to import extractive from ExtractiveSummary
Initially, the ModuleNotFoundError: No module named 'extractive'
error was experienced (as mentioned in issue #59 but it was resolved after changing the directory to src
.
Same issue for me as well, with import extractive from ExtractiveSummary
. It used to work a couple of weeks ago. Anything changed recently ?
This should now be resolved by 1395f378f7b661a1806bc70f653b0e46781dc575. Please let me know if this didn't work.
Thank you for fixing "_LazyAutoMapping" issue.
But now it triggers a ValueError though (which seems to have originally resolved a while back)
summary = extrSumm_model.predict(context, raw_scores=False, num_summary_sentences=6)
Error message is
ValueError: [E003] Not a valid pipeline component. Expected callable, but got 'sentencizer' (name: 'None').[E004] If you meant to add a built-in component, use `create_pipe`: `nlp.add_pipe(nlp.create_pipe('sentencizer'))`
Log is
/content/transformersum/src/extractive.py in predict(self, input_text, raw_scores, num_summary_sentences)
1174 """
1175 nlp = English()
-> 1176 nlp.add_pipe("sentencizer")
1177 doc = nlp(input_text)
/usr/local/lib/python3.7/dist-packages/spacy/language.py in add_pipe(self, component, name, before, after, first, last)
325 if isinstance(component, basestring_) and component in self.factories:
326 msg += Errors.E004.format(component=component)
--> 327 raise ValueError(msg)
328 if name is None:
329 name = util.get_component_name(component)
Tried making the change as mentioned in the error message; but no luck. Would you please check ?
Looks like you're using an old version of Spacy (probably v2). Please try upgrading to v3 with pip install -U spacy
. Some services (ex: Google Colab) come with v2 installed by default but this library is updated to work with v3.
That worked. Thank you so much.
After creating the transformersum conda env, I tried running
python predictions_website.py
and it triggers an error: