Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello everyone. I was using the model a week ago without any problems. Today I am getting an error when trying to load Top2Vec
model = Top2Vec(pdocs, embedding_model='universal-sentence-encoder-multilingual')

and I get an error like:
ValueError: Trying to load a model of incompatible/unknown type. 'C:\Users\...\Temp\tfhub_modules\26c892ffbc8d7b032f5a95f316e2841ed4f1608c' contains neither 'saved_model.pb' nor 'saved_model.pbtxt'.

I am kindly asking for help in solving the problem

also I got this message at the beggining
2023-07-10 10:30:20,136 - top2vec - INFO - Pre-processing documents for training
C:\Users\pkola\anaconda3\lib\site-packages\sklearn\feature_extraction\text.py:528: UserWarning: The parameter 'token_pattern' will not be used since 'tokenizer' is not None'
  warnings.warn(
2023-07-10 10:30:20,416 - top2vec - INFO - Downloading universal-sentence-encoder-multilingual model


What I have tried:

I found that if I run the model without the parameter embedding_model it still works.
But then even when I try to install:
pip install top2vec[sentence_encoders]

I have all of these libraries installed and error appears
Posted
Updated 10-Jul-23 0:46am
v5

Here is the solution that worked for me:
1. Error says there is lack of files in location: 'C:\Users\...\Temp\tfhub_modules\26c892ffbc8d7b032f5a95f316e2841ed4f1608c (it will be different location for you)
2. I manually downloaded encoder from universal-sentence-encoder-multilingual-large[^]
3. Unzip tar gz file twice
4. Drag and drop saved_model.pl to location from 1st point
5. Drag and drop files from variables folder to variables folder in 1st point location
enjoy
 
Share this answer
 
v2
C:\Users\...\Temp\tfhub_modules\26c892ffbc8d7b032f5a95f316e2841ed4f1608
go to this location in your computer and delete this folder 26c892ffbc8d7b032f5a95f316e2841ed4f1608
it worked for me
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900