Views
No views yet
google/bert-base-cased1from transformers import pipeline
2
3# Parent classifier
4move_classifier = pipeline("text-classification", model="stormsidali2001/IMRAD_introduction_moves_classifier")
5
6# Move 2 sub-move classifier
7submove_classifier_2 = pipeline("text-classification", model="stormsidali2001/IMRAD-introduction-move-two-sub-moves-classifier")
8
9sentence = "The findings of this study have significant implications for the field of [your field]."
10
11move_result = move_classifier(sentence)
12move = move_result[0]['label']
13
14if move == "Occupying the Niche":
15 submove_result = submove_classifier_2(sentence)
16 print(submove_result)