I have a very simple code to generate embeddings using sentence transformers. I have 15G space. It works well in the pythonanywhere console, but failed when I call it from flask app in pythonanywhere. How can I solve it?
# generate_embeddings
def generate_embeddings(sentences):
print(sentences) # this was printed in the server log when I run in flask
# create sentence embeddings
encoded_data = model.encode(sentences) # the process stopped here
print("embeddings shape: ", encoded_data.shape)
return encoded_data