nickmuchi commited on
Commit
95cf7cd
·
1 Parent(s): 9d0d071

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -380,7 +380,7 @@ def schleifer_model():
380
  def get_sentence_embedding_model():
381
  return SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
382
 
383
- @st.cache
384
  def get_ner_pipeline():
385
  tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
386
  model = AutoModelForTokenClassification.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
 
380
  def get_sentence_embedding_model():
381
  return SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
382
 
383
+ @st.cache(hash_funcs={tokenizers.Tokenizer: my_hash_func})
384
  def get_ner_pipeline():
385
  tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
386
  model = AutoModelForTokenClassification.from_pretrained("xlm-roberta-large-finetuned-conll03-english")