Dehnes commited on
Commit
97cb487
1 Parent(s): 0f7af39

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +17 -0
README.md ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```python
2
+
3
+ from transformers import pipeline
4
+
5
+ classifier = pipeline("zero-shot-classification",
6
+
7
+ model="Dehnes/zeroshot_gbert")
8
+
9
+ sequence = "Letzte Woche gab es einen Selbstmord in einer nahe gelegenen Stadt"
10
+
11
+ candidate_labels = ["Verbrechen","Tragödie","Stehlen"]
12
+
13
+ hypothesis_template = "In diesem Satz geht es um das Thema {}." ## Since monolingual model,its sensitive to hypothesis template. This can be experimented
14
+
15
+ classifier(sequence, candidate_labels, hypothesis_template=hypothesis_template)
16
+
17
+ ```