aliasgerovs commited on
Commit
51cffc4
·
1 Parent(s): 65029fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -20,6 +20,7 @@ import plotly.graph_objects as go
20
  import nltk
21
 
22
  nltk.download('punkt')
 
23
 
24
  from writing_analysis import (
25
  normalize,
@@ -344,7 +345,6 @@ def build_date(year, month, day):
344
 
345
  def len_validator(text):
346
  min_tokens = 128
347
- tokenizer = AutoTokenizer.from_pretrained('google-bert/bert-base-uncased')
348
  lengt = len(tokenizer.tokenize(text = text, return_tensors="pt"))
349
  if lengt < min_tokens:
350
  return f"Warning! Input length is {lengt}. Please input a text that is greater than {min_tokens} tokens long. Recommended length {min_tokens*2} tokens."
 
20
  import nltk
21
 
22
  nltk.download('punkt')
23
+ tokenizer = AutoTokenizer.from_pretrained('google-bert/bert-base-uncased')
24
 
25
  from writing_analysis import (
26
  normalize,
 
345
 
346
  def len_validator(text):
347
  min_tokens = 128
 
348
  lengt = len(tokenizer.tokenize(text = text, return_tensors="pt"))
349
  if lengt < min_tokens:
350
  return f"Warning! Input length is {lengt}. Please input a text that is greater than {min_tokens} tokens long. Recommended length {min_tokens*2} tokens."