Spaces:
Paused
Paused
Carlos Rosas
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ llm = LLM(model_name, max_model_len=8128)
|
|
27 |
|
28 |
# Connect to the LanceDB database
|
29 |
db = lancedb.connect("content/lancedb_data")
|
30 |
-
table = db.open_table("
|
31 |
|
32 |
def hybrid_search(text):
|
33 |
results = table.search(text, query_type="hybrid").limit(6).to_pandas()
|
@@ -36,7 +36,7 @@ def hybrid_search(text):
|
|
36 |
document_html = []
|
37 |
for _, row in results.iterrows():
|
38 |
hash_id = str(row['hash'])
|
39 |
-
title = row['
|
40 |
#content = row['text'][:100] + "..." # Truncate the text for preview
|
41 |
content = row['text']
|
42 |
|
|
|
27 |
|
28 |
# Connect to the LanceDB database
|
29 |
db = lancedb.connect("content/lancedb_data")
|
30 |
+
table = db.open_table("scientific_documents")
|
31 |
|
32 |
def hybrid_search(text):
|
33 |
results = table.search(text, query_type="hybrid").limit(6).to_pandas()
|
|
|
36 |
document_html = []
|
37 |
for _, row in results.iterrows():
|
38 |
hash_id = str(row['hash'])
|
39 |
+
title = row['section']
|
40 |
#content = row['text'][:100] + "..." # Truncate the text for preview
|
41 |
content = row['text']
|
42 |
|