datasetsANDmodels commited on
Commit
7f64a87
·
verified ·
1 Parent(s): 48b5f4b

Update usage.py

Browse files
Files changed (1) hide show
  1. usage.py +1 -3
usage.py CHANGED
@@ -4,10 +4,8 @@ from transformers import pipeline
4
  # Define candidate labels for classification
5
  candidate_labels_spam = ['Spam', 'not Spam']
6
  candidate_labels_urgent = ['Urgent', 'not Urgent']
7
-
8
- model="MoritzLaurer/deberta-v3-large-zeroshot-v1.1-all-33"
9
  model="SpamUrgencyDetection"
10
- clf = pipeline("zero-shot-classification", model=model)
11
  def predict(text):
12
  p_spam = clf(text, candidate_labels_spam)["labels"][0]
13
  p_urgent = clf(text, candidate_labels_urgent)["labels"][0]
 
4
  # Define candidate labels for classification
5
  candidate_labels_spam = ['Spam', 'not Spam']
6
  candidate_labels_urgent = ['Urgent', 'not Urgent']
 
 
7
  model="SpamUrgencyDetection"
8
+ clf = pipeline("zero-shot-classification", model=model) 32
9
  def predict(text):
10
  p_spam = clf(text, candidate_labels_spam)["labels"][0]
11
  p_urgent = clf(text, candidate_labels_urgent)["labels"][0]