msmaje commited on
Commit
6ddf6d9
·
verified ·
1 Parent(s): 422fdb8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -635,7 +635,7 @@ def push_to_hub_after_training(model_path, username, model_name, token):
635
 
636
  def count_tokens(text):
637
  """Count tokens in input text"""
638
- if not text or CURRENT_TOKENIZER is None:
639
  return "Enter text to see token count"
640
  tokens = CURRENT_TOKENIZER(text, truncation=False)
641
  count = len(tokens['input_ids'])
 
635
 
636
  def count_tokens(text):
637
  """Count tokens in input text"""
638
+ if not text or CURRENT_TOKENIZER === None:
639
  return "Enter text to see token count"
640
  tokens = CURRENT_TOKENIZER(text, truncation=False)
641
  count = len(tokens['input_ids'])