dmmiller612 / bert-extractive-summarizer

Easy to use extractive text summarization with BERT
MIT License
1.37k stars 307 forks source link

NameError: name 'model' is not defined #110

Closed SampadaShete closed 2 years ago

SampadaShete commented 3 years ago

NameError Traceback (most recent call last)

in () 2 3 start = time.time() ----> 4 resp = model(''' 5 The Chrysler Building, the famous art deco New York skyscraper, will be sold for a small fraction of its previous sales price. 6 The deal, first reported by The Real Deal, was for $150 million, according to a source familiar with the deal. NameError: name 'model' is not defined Can anyone help with this please?
dmmiller612 commented 2 years ago

You will need to define the model like:

from summarizer import Summarizer

body = 'Text body that you want to summarize with BERT'
body2 = 'Something else you want to summarize with BERT'
model = Summarizer()
model(body)
model(body2)