Skip to content

keenangraham/open-ai-semantic-search-with-encode-project-data

Repository files navigation

Semantic search over ENCODE project data using OpenAI embeddings

Run example Jupyter notebook

The Semantic Search Example Jupyter notebook shows an example of using the underlying Python library to load JSON documents, calculate OpenAI embeddings, and perform semantic search.

You can run locally by installing the following dependencies in clean Python (>=3.10) environment:

$ pip install -e backend/.
$ pip install jupyter

Define your OPENAI_API_KEY in your environment:

$ export OPENAI_API_KEY=xyz123

Run notebook:

$ jupyter notebook

Open semantic_search_example.ipynb. Note the code assumes your OpenAI API key (for making calls to the OpenAI API) is defined in your environment.

Run UI and API application

You can also run the search application (NextJS and FastAPI for the frontend and backend, respectively) locally if you have Docker installed:

$ docker compose up --build

Browse frontend at localhost:3000 and backend at localhost:8000.

Automated API documentation is available at localhost:8000/docs or localhost:8000/redoc:

About

Semantic search over ENCODE project data using OpenAI embeddings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published