pequeños cambios

This commit is contained in:
2025-09-16 03:20:51 +02:00
parent 1c8f4ce79f
commit 1deabb8a26
3 changed files with 65 additions and 329 deletions
+4 -8
View File
@@ -1,6 +1,6 @@
import marimo
__generated_with = "0.15.3"
__generated_with = "0.15.5"
app = marimo.App(width="columns")
@@ -229,7 +229,6 @@ def _():
repo_id="nomic-ai/nomic-embed-text-v1.5",
local_dir=".model/nomic-embed-text-v1.5"
)
return
@@ -257,7 +256,6 @@ def _():
for text, _vector in zip(texts, embeddings):
print(f"Texto: {text}\nDimensión: {_vector.shape[0]}\nPrimeros valores: {_vector[:5].tolist()}\n")
return model, tokenizer, torch
@@ -415,7 +413,7 @@ def _():
def _(mo):
_df = mo.sql(
f"""
SELECT * FROM
SELECT * FROM
"""
)
return
@@ -469,7 +467,6 @@ def _(mo):
# Caja de texto para la consulta
query_input = mo.ui.text(label="Texto de búsqueda", full_width=True)
query_input
return (query_input,)
@@ -492,7 +489,6 @@ def _(model, query_input, tokenizer, torch):
embedding_str = None
embedding_str
return (embedding_str,)
@@ -516,10 +512,10 @@ def _(
host=HOST,
port=PUERTO_POSTGRES
)
conn3.autocommit = True
_cur = conn3.cursor()
_cur.execute(
"""
SELECT id, titulo, embedding <#> %s::vector AS distancia