Bible Semantic Search
share.streamlit.io
Bible Semantic Search
1–10 of 93 posts
Re: Bible Semantic Search
#2Re: Bible Semantic Search
#3…and it's gone.
Re: Bible Semantic Search
#4Re: Bible Semantic Search
#5totally missed when they made a sharing platform.
Re: Bible Semantic Search
#6Re: Bible Semantic Search
#7Explanation when you click “Wat this?”:
> This is a Streamlit app I prototyped for performing semantic search on the King James Bible. It conducts full text search as well as semantic search, which is useful for surfacing passages that are similar in meaning to the query, even if the passages don't explicitly contain the query keyword(s). Suppose you wanted to bring up all verses that reference the infamous snake that tempted Eve. In a traditional keyword search system, searching for 'snake' wouldn't yield any results because the KJV uses the term 'serpent'. A semantic search system would take that 'snake' query and retrieve the relevant verses that contain 'serpent' as well as similar verses like ones about reptiles.
> Under the hood, I've generated vector embeddings of every verse in the Bible using SBERT (https://www.sbert.net/), and stored those embeddings in a vector database called Pinecone (https://www.pinecone.io). Every time you submit a query, it's converted to its vector representation using SBERT. That query vector is then sent to Pinecone, which performs an Approximate Nearest Neighbor (https://www.pinecone.io/learn/what-is-similarity-search/) search, retrieving the top n verses that are the most semantically similar to our query. The verses returned are ranked in order of most to least similar.
(Full disclosure: I work for Pinecone, but I have no connection to this demo.)
Re: Bible Semantic Search
#8Quoted post unavailable.
AttributeError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app).
Traceback:
File "/home/appuser/venv/lib/python3.8/site-packages/streamlit/scriptrunner/script_runner.py", line 475, in _run_script
exec(code, module.__dict__)
File "/app/bible-semantic-search/app.py", line 11, in
index = PineconeIndex("qa-index")
File "/app/bible-semantic-search/pinecone_index.py", line 16, in __init__
self.index = self.connect_to_index(index_name)
File "/app/bible-semantic-search/pinecone_index.py", line 30, in connect_to_index
index = pinecone.Index(index_name)
File "/home/appuser/venv/lib/python3.8/site-packages/pinecone/index.py", line 34, in __init__
openapi_client_config.api_key = openapi_client_config.api_key or {}Re: Bible Semantic Search
#9Quoted post unavailable.
Tried to use it and got: AttributeError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app). Traceback: File "/home/appuser/venv/lib/python3.8/site-packages/streamlit/scriptrunner/script_runner.py", line 475, in _run_script exec(code, modu…
Re: Bible Semantic Search
#10A clear example is the query: "homosexuality"
This returns:
> James 2:3 - And ye have respect to him that weareth the gay clothing, and say unto him, Sit thou here in a good place; and say to the poor, Stand thou there, or sit here under my footstool
It's clearly seeing "gay" but is unaware that the meaning has changed.
A classic issue when applying a ML model out of domain.