minko186 commited on
Commit
4fd751f
·
verified ·
1 Parent(s): 3076727

Update gptzero_free.py

Browse files
Files changed (1) hide show
  1. gptzero_free.py +10 -9
gptzero_free.py CHANGED
@@ -24,15 +24,16 @@ class GPT2PPL:
24
  self.stride = 512
25
 
26
  def getResults(self, threshold):
27
- if threshold < 60:
28
- label = 0
29
- return "The Text is generated by AI.", label
30
- elif threshold < 80:
31
- label = 0
32
- return "The Text is most probably contain parts which are generated by AI. (require more text for better Judgement)", label
33
- else:
34
- label = 1
35
- return "The Text is written by Human.", label
 
36
 
37
  def __call__(self, sentence):
38
  """
 
24
  self.stride = 512
25
 
26
  def getResults(self, threshold):
27
+ # if threshold < 60:
28
+ # label = 0
29
+ # return "The Text is generated by AI.", label
30
+ # elif threshold < 80:
31
+ # label = 0
32
+ # return "The Text is most probably contain parts which are generated by AI. (require more text for better Judgement)", label
33
+ # else:
34
+ # label = 1
35
+ # return "The Text is written by Human.", label
36
+ return {"HUMAN": threshold, "AI": 1 - threshold}
37
 
38
  def __call__(self, sentence):
39
  """