pequeños cambios
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user