Skip to content

Commit

Permalink
updates to 1.4 samples
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Siegler committed Oct 25, 2024
1 parent 04e5de8 commit ec0ade9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
4 changes: 3 additions & 1 deletion HuggingFace_search/huggingface_inference.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,9 @@
},
"source": [
"## Embed the Query with the Hugging Face Inference API\n",
"Use the Hugging Face Inference API to embed the query so that it can be used to search our index"
"Use the Hugging Face Inference API to embed the query so that it can be used to search our index\n",
"\n",
"!! Note that you might need to run this cell a few times as it takes a few seconds for the model to be ready."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion TSS_transformed/Transformed_TSS_pattern_matching.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@
},
"outputs": [],
"source": [
"# Create the table called \"metadata_demo\"\n",
"# Create the table called \"sensors\"\n",
"table = database.create_table(\"sensors\",\n",
" schema = sensor_schema,\n",
" indexes = indexes,\n",
Expand Down
4 changes: 0 additions & 4 deletions multimodal_RAG_ImageBind/multi_modal_ImageBind.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,6 @@
},
"outputs": [],
"source": [
"os.environ[\"KDBAI_ENDPOINT\"]=\"http://localhost:8082\"\n",
"os.environ[\"KDBAI_API_KEY\"]=\"\"\n",
"#Set up KDB.AI endpoint and API key\n",
"KDBAI_ENDPOINT = (\n",
" os.environ[\"KDBAI_ENDPOINT\"]\n",
Expand Down Expand Up @@ -1456,8 +1454,6 @@
"def mm_search(query):\n",
" image_results = table.search(vectors={\"flat_index\":query}, n=2, filter=[(\"like\", \"media_type\", \"image\")])\n",
" text_results = table.search(vectors={\"flat_index\":query}, n=1, filter=[(\"like\", \"media_type\", \"text\")])\n",
" #image_results = table.search(query, n=2, filter=[(\"like\", \"media_type\", \"image\")])\n",
" #text_results = table.search(query, n=1, filter=[(\"like\", \"media_type\", \"text\")])\n",
" results = [pd.concat([image_results[0], text_results[0]], ignore_index=True)]\n",
" viewResults(results)\n",
" return(results)"
Expand Down
2 changes: 1 addition & 1 deletion multimodal_RAG_unified_text/multi_modal_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@
"metadata": {},
"outputs": [],
"source": [
"# Create the table called \"metadata_demo\"\n",
"# Create the table called \"multi_modal_demo\"\n",
"table = database.create_table(\"multi_modal_demo\", schema=table_schema, indexes=indexes)"
]
},
Expand Down

0 comments on commit ec0ade9

Please sign in to comment.