Downloads · 30 days
0
Pameminch/puntoscomunes
puntoscomunes is a machine learning model from Pameminch. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
from sentencetransformers import SentenceTransformer, util
Downloads · 30 days
0
Access
Public
Updated Nov 16, 2024
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 71%
From the Hugging Face model README
from sentence_transformers import SentenceTransformer, util
model = SentenceTransformer('paraphrase-MiniLM-L6-v2')
extracto_instrumento_a = ["Proteger las rutas migratorias de las ballenas mediante la creación de nuevas áreas marinas protegidas."] extracto_instrumento_b = ["Establecer zonas de protección para la megafauna marina, con énfasis en las rutas migratorias de las ballenas."]
embeddings_a = model.encode(extracto_instrumento_a) embeddings_b = model.encode(extracto_instrumento_b)
similitud = util.pytorch_cos_sim(embeddings_a, embeddings_b) print(f"Similitud semántica: {similitud.item()}")