Closed debanjanbhucs closed 2 years ago
It will be nice to have the usage interface as follows
from dlkp.models import KeyphraseTagger from dlkp.models import KeyphraseGenerator
load the keyphrase tagger tagger = KeyphraseTagger.load(<path to tagger/model name in huggingface hub>
Run keyphrase extraction over input_text tagger.predict(input_text)
load the keyphrase generator generator = KeyphraseGenerator.load(<path to tagger/model name in huggingface hub>
Run keyphrase generation over input_text generator.predict(input_text)
@debanjanbhucs this is fixed with PR #15 . pls look at inference_tagger.py and 'train_tagger...py` for usage details.
inference_tagger.py
It will be nice to have the usage interface as follows
from dlkp.models import KeyphraseTagger from dlkp.models import KeyphraseGenerator
load the keyphrase tagger tagger = KeyphraseTagger.load(<path to tagger/model name in huggingface hub>
Run keyphrase extraction over input_text tagger.predict(input_text)
load the keyphrase generator generator = KeyphraseGenerator.load(<path to tagger/model name in huggingface hub>
Run keyphrase generation over input_text generator.predict(input_text)