Skip to content

bsenst/Connections-Hackathon

Repository files navigation

Connections-Hackathon

Submission to the Streamlit Connections Hackathon to demonstrate the experimental streamlit connector to connect the streamlit app to the Milvus vector database. The adapted connector can be found in the connection.py script.

For the time of the Hackathon the app connected to the database backend can be reached at https://connections-hackathon-ltar9bp4kpm2hssniappyvr.streamlit.app/

image_showing_streamlit_cloud_app_medium_semantic_search

Local Deployment

Follow these steps to deploy the app locally.

1. Set up Milvus Vector Database

Milvus is an open-source vector database under Apache-2 License.

https://milvus.io/docs/install_standalone-docker.md

Run the Milvus vector database docker container:

wget https://github.com/milvus-io/milvus/releases/download/v2.2.12/milvus-standalone-docker-compose.yml -O docker-compose.yml
sudo docker-compose up -d
sudo docker-compose ps

https://milvus.io/docs/example_code.md

Run the hello_milvus.py script and populate the database with dummy vector data:

python hello_milvus.py

2. Run the Streamlit Example

Create a virtual environment and install the requirements:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Make sure streamlit you have a streamlit secrets file secrets.toml for optional secret variables if run locally.

Run the example streamlit app:

streamlit run local_app.py

image_showing_streamlit_running_milvus_queries

3. Clean up

Stop the streamlit app by pressing Ctrl-C.

Stop the docker container and remove the database data:

sudo docker-compose down
sudo rm -rf  volumes

About

Submission to the Streamlit Connections Hackathon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages