Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ embeddings, patent_numbers, metadata, texts = load_data()
|
|
51 |
try:
|
52 |
tokenizer = AutoTokenizer.from_pretrained('anferico/bert-for-patents')
|
53 |
bert_model = AutoModel.from_pretrained('anferico/bert-for-patents')
|
54 |
-
word_embedding_model = models.Transformer(model_name='anferico/bert-for-patents', tokenizer=tokenizer
|
55 |
pooling_model = models.Pooling(word_embedding_model.get_word_embedding_dimension())
|
56 |
model = SentenceTransformer(modules=[word_embedding_model, pooling_model])
|
57 |
except Exception as e:
|
|
|
51 |
try:
|
52 |
tokenizer = AutoTokenizer.from_pretrained('anferico/bert-for-patents')
|
53 |
bert_model = AutoModel.from_pretrained('anferico/bert-for-patents')
|
54 |
+
word_embedding_model = models.Transformer(model_name='anferico/bert-for-patents', tokenizer=tokenizer)
|
55 |
pooling_model = models.Pooling(word_embedding_model.get_word_embedding_dimension())
|
56 |
model = SentenceTransformer(modules=[word_embedding_model, pooling_model])
|
57 |
except Exception as e:
|