Spaces:
Runtime error
Runtime error
Update gptzero_free.py
Browse files- gptzero_free.py +4 -1
gptzero_free.py
CHANGED
|
@@ -33,7 +33,10 @@ class GPT2PPL:
|
|
| 33 |
# else:
|
| 34 |
# label = 1
|
| 35 |
# return "The Text is written by Human.", label
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
def __call__(self, sentence):
|
| 39 |
"""
|
|
|
|
| 33 |
# else:
|
| 34 |
# label = 1
|
| 35 |
# return "The Text is written by Human.", label
|
| 36 |
+
normalized_score = (score - 60) / 2
|
| 37 |
+
# Cap the values at 0 and 100
|
| 38 |
+
human_score = max(0, min(1, normalized_score))
|
| 39 |
+
return {"HUMAN": human_score, "AI": 1 - human_score}
|
| 40 |
|
| 41 |
def __call__(self, sentence):
|
| 42 |
"""
|