prateekagrawal commited on
Commit
04d97c8
1 Parent(s): c1b0837

Fixed typo

Browse files
Files changed (1) hide show
  1. apps/inference.py +1 -1
apps/inference.py CHANGED
@@ -17,7 +17,7 @@ def load_model(masked_text, model_name):
17
  model = AutoModelForMaskedLM.from_pretrained(model_name, from_flax=from_flax)
18
  tokenizer = AutoTokenizer.from_pretrained(model_name)
19
  MASK_TOKEN = tokenizer.mask_token
20
- masked_text = masked_text.replcae("<mask>", MASK_TOKEN)
21
  nlp = pipeline("fill-mask", model=model, tokenizer=tokenizer)
22
  result_sentence = nlp(masked_text)
23
  return result_sentence
 
17
  model = AutoModelForMaskedLM.from_pretrained(model_name, from_flax=from_flax)
18
  tokenizer = AutoTokenizer.from_pretrained(model_name)
19
  MASK_TOKEN = tokenizer.mask_token
20
+ masked_text = masked_text.replace("<mask>", MASK_TOKEN)
21
  nlp = pipeline("fill-mask", model=model, tokenizer=tokenizer)
22
  result_sentence = nlp(masked_text)
23
  return result_sentence