diff --git a/bert.py b/bert.py deleted file mode 100755 index fe80910..0000000 --- a/bert.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/python -from transformers import pipeline -import sys - -classifier = pipeline("zero-shot-classification", model="models/distilbert-base-uncased-mnli") - -sequence = sys.argv[1] -candidate_labels = sys.argv[2].split(",") - -res = classifier(sequence, candidate_labels, multi_label=True, truncation=False) - -for i, label in enumerate(candidate_labels): - print("%d. %s [%.2f]" % (i, res['labels'][i], res['scores'][i])) - if res['scores'][i] > 0.75: - print("Keyword is True") - else: - print("Keyword is False") diff --git a/main.go b/main.go index b2cd770..4d80ded 100644 --- a/main.go +++ b/main.go @@ -113,7 +113,7 @@ func OperationsMode(db *badger.DB, mode string) { wg.Done() }() - fmt.Println("Enter the categories for filtering separted by a comma, e.g. Tech,Climate,Gaming:") + fmt.Println("Enter the categories for filtering separated by a comma, e.g. Tech,Climate,Gaming:") var categories []string var categoryParam string