sa-rehman commited on
Commit
e0e00e7
1 Parent(s): 94d64b7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -0
README.md CHANGED
@@ -4,10 +4,17 @@
4
 
5
 
6
  from transformers import pipeline
 
7
  pipe = pipeline("text-classification", model="sa-rehman/stress_classifier")
 
8
  def predict(sentence):
 
9
  pred=pipe.predict(sentence)
 
10
  if pred[0].get("label")=='LABEL_1':
 
11
  return "relaxed"
 
12
  else:
 
13
  return "stressed"
 
4
 
5
 
6
  from transformers import pipeline
7
+
8
  pipe = pipeline("text-classification", model="sa-rehman/stress_classifier")
9
+
10
  def predict(sentence):
11
+
12
  pred=pipe.predict(sentence)
13
+
14
  if pred[0].get("label")=='LABEL_1':
15
+
16
  return "relaxed"
17
+
18
  else:
19
+
20
  return "stressed"