oshizo commited on
Commit
a03edbc
1 Parent(s): 266f9bb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -25,7 +25,7 @@ from transformers import AutoModelForSequenceClassification, AutoTokenizer
25
  model_id = "oshizo/japanese-sexual-moderation-v2"
26
 
27
  tokenizer = AutoTokenizer.from_pretrained(model_id)
28
- model_ = AutoModelForSequenceClassification.from_pretrained(
29
  model_id,
30
  problem_type="regression"
31
  )
@@ -38,7 +38,7 @@ texts = [
38
 
39
  with torch.no_grad():
40
  encoding = tokenizer(texts, padding=True, max_length=64, return_tensors="pt")
41
- scores = model_(**encoding).logits
42
 
43
  # tensor([[-0.0045],
44
  # [ 0.2954],
 
25
  model_id = "oshizo/japanese-sexual-moderation-v2"
26
 
27
  tokenizer = AutoTokenizer.from_pretrained(model_id)
28
+ model = AutoModelForSequenceClassification.from_pretrained(
29
  model_id,
30
  problem_type="regression"
31
  )
 
38
 
39
  with torch.no_grad():
40
  encoding = tokenizer(texts, padding=True, max_length=64, return_tensors="pt")
41
+ scores = model(**encoding).logits
42
 
43
  # tensor([[-0.0045],
44
  # [ 0.2954],