Closed guenthermi closed 1 year ago
This PR allows one to load models from https://huggingface.co/jinaai:
import finetuner import numpy as np model = finetuner.get_model('jinaai/ecommerce-sbert-model') e1, e2 = finetuner.encode(model, ['XBox', 'Xbox One Console 500GB - Black (2015)']) print(f'Similarity: {np.dot(e1,e2)/(np.linalg.norm(e1)*np.linalg.norm(e2))}')
Similarity: 0.7842968702316284
feat: support loading models from hf
This PR allows one to load models from https://huggingface.co/jinaai: