Update app.py
Browse files
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")
|