[up]: Update README
Browse files
README.md
CHANGED
@@ -22,7 +22,7 @@ tags:
|
|
22 |
|
23 |
<h1 align="center">SuperAnnotate</h1>
|
24 |
<h3 align="center">
|
25 |
-
AI Detector<br/>
|
26 |
Fine-Tuned RoBERTa Large<br/>
|
27 |
</h3>
|
28 |
|
@@ -77,9 +77,13 @@ Run following command: ```pip install git+https://github.com/superannotateai/gen
|
|
77 |
from generated_text_detector.utils.model.roberta_classifier import RobertaClassifier
|
78 |
from transformers import AutoTokenizer
|
79 |
import torch.nn.functional as F
|
80 |
-
|
81 |
-
|
|
|
|
|
|
|
82 |
text_example = "It's not uncommon for people to develop allergies or intolerances to certain foods as they get older. It's possible that you have always had a sensitivity to lactose (the sugar found in milk and other dairy products), but it only recently became a problem for you. This can happen because our bodies can change over time and become more or less able to tolerate certain things. It's also possible that you have developed an allergy or intolerance to something else that is causing your symptoms, such as a food additive or preservative. In any case, it's important to talk to a doctor if you are experiencing new allergy or intolerance symptoms, so they can help determine the cause and recommend treatment."
|
|
|
83 |
tokens = tokenizer.encode_plus(
|
84 |
text_example,
|
85 |
add_special_tokens=True,
|
@@ -89,8 +93,11 @@ truncation=True,
|
|
89 |
return_token_type_ids=True,
|
90 |
return_tensors="pt"
|
91 |
)
|
|
|
92 |
_, logits = model(**tokens)
|
|
|
93 |
proba = F.sigmoid(logits).squeeze(1).item()
|
|
|
94 |
print(proba)
|
95 |
```
|
96 |
|
@@ -119,7 +126,7 @@ This solution has been validated using the [RAID](https://raid-bench.xyz/) bench
|
|
119 |
- 11 adversarial attacks
|
120 |
- 8 domains
|
121 |
|
122 |
-
The performance of
|
123 |
|
124 |
![RAID leaderboard](RAID_leaderboard_oct_2024.png)
|
125 |
|
|
|
22 |
|
23 |
<h1 align="center">SuperAnnotate</h1>
|
24 |
<h3 align="center">
|
25 |
+
AI Detector Low FPR<br/>
|
26 |
Fine-Tuned RoBERTa Large<br/>
|
27 |
</h3>
|
28 |
|
|
|
77 |
from generated_text_detector.utils.model.roberta_classifier import RobertaClassifier
|
78 |
from transformers import AutoTokenizer
|
79 |
import torch.nn.functional as F
|
80 |
+
|
81 |
+
|
82 |
+
model = RobertaClassifier.from_pretrained("SuperAnnotate/ai-detector-low-fpr")
|
83 |
+
tokenizer = AutoTokenizer.from_pretrained("SuperAnnotate/ai-detector-low-fpr")
|
84 |
+
|
85 |
text_example = "It's not uncommon for people to develop allergies or intolerances to certain foods as they get older. It's possible that you have always had a sensitivity to lactose (the sugar found in milk and other dairy products), but it only recently became a problem for you. This can happen because our bodies can change over time and become more or less able to tolerate certain things. It's also possible that you have developed an allergy or intolerance to something else that is causing your symptoms, such as a food additive or preservative. In any case, it's important to talk to a doctor if you are experiencing new allergy or intolerance symptoms, so they can help determine the cause and recommend treatment."
|
86 |
+
|
87 |
tokens = tokenizer.encode_plus(
|
88 |
text_example,
|
89 |
add_special_tokens=True,
|
|
|
93 |
return_token_type_ids=True,
|
94 |
return_tensors="pt"
|
95 |
)
|
96 |
+
|
97 |
_, logits = model(**tokens)
|
98 |
+
|
99 |
proba = F.sigmoid(logits).squeeze(1).item()
|
100 |
+
|
101 |
print(proba)
|
102 |
```
|
103 |
|
|
|
126 |
- 11 adversarial attacks
|
127 |
- 8 domains
|
128 |
|
129 |
+
The performance of detector is compared to other detectors on the [RAID leaderboard](https://raid-bench.xyz/leaderboard).
|
130 |
|
131 |
![RAID leaderboard](RAID_leaderboard_oct_2024.png)
|
132 |
|