yaful commited on
Commit
6da6fb5
·
1 Parent(s): a5a9283

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -16,6 +16,9 @@ tokenizer = AutoTokenizer.from_pretrained(model_dir)
16
  model = AutoModelForSequenceClassification.from_pretrained(model_dir).to(device)
17
 
18
  def detect(input_text,th=-3.08583984375):
 
 
 
19
  label2decisions = {
20
  0: "machine-generated",
21
  1: "human-written",
 
16
  model = AutoModelForSequenceClassification.from_pretrained(model_dir).to(device)
17
 
18
  def detect(input_text,th=-3.08583984375):
19
+ if len(input_text.split()) < 80:
20
+ return 'It is not reliable to detect text with less than 80 words.'
21
+
22
  label2decisions = {
23
  0: "machine-generated",
24
  1: "human-written",