EvilScript commited on
Commit
4238708
·
verified ·
1 Parent(s): 4462d9a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -5
README.md CHANGED
@@ -66,8 +66,8 @@ from transformers import pipeline
66
 
67
  clf = pipeline(
68
  task="text-classification",
69
- model="YOUR_USERNAME/academic-sentiment-classifier",
70
- tokenizer="YOUR_USERNAME/academic-sentiment-classifier",
71
  return_all_scores=False,
72
  )
73
 
@@ -82,7 +82,7 @@ If you prefer friendly labels, you can map them:
82
  from transformers import pipeline
83
 
84
  id2name = {"LABEL_0": "negative", "LABEL_1": "positive"}
85
- clf = pipeline("text-classification", model="YOUR_USERNAME/academic-sentiment-classifier")
86
  res = clf("This section lacks clarity and the experiments are inconclusive.")[0]
87
  res["label"] = id2name.get(res["label"], res["label"]) # map to human-friendly label
88
  print(res)
@@ -95,8 +95,8 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification
95
  import torch
96
 
97
  device = 0 if torch.cuda.is_available() else -1
98
- tok = AutoTokenizer.from_pretrained("YOUR_USERNAME/academic-sentiment-classifier")
99
- model = AutoModelForSequenceClassification.from_pretrained("YOUR_USERNAME/academic-sentiment-classifier")
100
 
101
  texts = [
102
  "I recommend acceptance; the methodology is solid and results are convincing.",
 
66
 
67
  clf = pipeline(
68
  task="text-classification",
69
+ model="EvilScript/academic-sentiment-classifier",
70
+ tokenizer="EvilScript/academic-sentiment-classifier",
71
  return_all_scores=False,
72
  )
73
 
 
82
  from transformers import pipeline
83
 
84
  id2name = {"LABEL_0": "negative", "LABEL_1": "positive"}
85
+ clf = pipeline("text-classification", model="EvilScript/academic-sentiment-classifier")
86
  res = clf("This section lacks clarity and the experiments are inconclusive.")[0]
87
  res["label"] = id2name.get(res["label"], res["label"]) # map to human-friendly label
88
  print(res)
 
95
  import torch
96
 
97
  device = 0 if torch.cuda.is_available() else -1
98
+ tok = AutoTokenizer.from_pretrained("EvilScript/academic-sentiment-classifier")
99
+ model = AutoModelForSequenceClassification.from_pretrained("EvilScript/academic-sentiment-classifier")
100
 
101
  texts = [
102
  "I recommend acceptance; the methodology is solid and results are convincing.",