RooLeX commited on
Commit
ab4a797
·
verified ·
1 Parent(s): caf57f7

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +3 -2
README.md CHANGED
@@ -50,11 +50,12 @@ def predict_toxicity(text):
50
  with torch.no_grad():
51
  outputs = model(**inputs)
52
  probs = torch.softmax(outputs.logits, dim=-1)
53
- return int(torch.argmax(probs)), probs[0, 1].item()```
54
 
55
  # Пример
56
  print(predict_toxicity("Ты идиот!")) # (1, ~0.9998)
57
  print(predict_toxicity("Здравствуйте, чем могу помочь?")) # (0, ~0.0000)
 
58
 
59
  ## Training details
60
  - Base model: ai-forever/ru-en-RoSBERTa
@@ -74,4 +75,4 @@ print(predict_toxicity("Здравствуйте, чем могу помочь?"
74
  RooLeX
75
 
76
  ## Contact
77
- Hugging Face: RooLeX
 
50
  with torch.no_grad():
51
  outputs = model(**inputs)
52
  probs = torch.softmax(outputs.logits, dim=-1)
53
+ return int(torch.argmax(probs)), probs[0, 1].item()
54
 
55
  # Пример
56
  print(predict_toxicity("Ты идиот!")) # (1, ~0.9998)
57
  print(predict_toxicity("Здравствуйте, чем могу помочь?")) # (0, ~0.0000)
58
+ ```
59
 
60
  ## Training details
61
  - Base model: ai-forever/ru-en-RoSBERTa
 
75
  RooLeX
76
 
77
  ## Contact
78
+ Hugging Face: RooLeX