Examples for Jina
Table of Contents
These examples showcase Jina in action and provide sample code for you to work from. We suggest you read Jina 101 and What is Neural Search? to get a conceptual overview.
To learn more about how to use Jina, please refer to our docs.
🐣 Simple Examples
|
My First Jina AppBrand new to neural search? Not for long! Use cookiecutter to search through Star Trek scripts using Jina |
|
Build a NLP Semantic Search System with TransformersUpgrade from plain search to sentence search and practice your Flows and Pods by searching South Park scripts |
|
Search Lyrics with Transformers and PyTorchGet a better understanding of chunks by searching a lyrics database. Now with shiny front-end! |
|
Google's Big Transfer Model in (Poké-)ProductionUse SOTA visual representation for searching Pokémon! |
|
Object detection with fasterrcnn and MobileNetV2Detect, index and query similar objects |
|
Search YouTube audio data with VggishA demo of neural search for audio data based Vggish model. |
|
Search Tumblr GIFs with KerasEncoderUse prefetching and sharding to improve the performance of your index and query flow when searching animated GIFs. |
🚀 Advanced Examples
|
Index and query with FAISSBuild a vector search engine that finds the closest vector in the database to a query. |
|
Cross Modal: Search images from captions and vice-versaUse one modality (text) to search another (images) |
|
Multi-Modal: Search images with 2 modalities in the queryUse more than one modality (image+text) to search images |
|
Build complex logic, structures and filters with Query LanguageCreate separate indexes and queries for different clothing in Fashion-MNIST |
Community Examples
Want to add your own example? Please check our guidelines!
|
Simple Wikipedia Sentence SearchSimple Jina app to search sentences from Wikipedia using Transformers |
|
Financial Question Answering SearchOpinionated QA passage retrieval with BERT-based reranker |
Adding Tests for Examples
You are highly encouraged to add a test for your example so that we will be alerted if it breaks in the future:
- Put your test data in the
tests
folder. The test data can be a few text sentences, images or audio samples - Create
test_[your_example].py
in thetests
folder. Add your test cases to thetests
file with meaningful asserts depending on example input and output - Run the test locally to confirm before pushing with pytest
- Add your example folder name to the
path
variable inmatrix
of.github/worflows/ci.yml
. This will trigger your example test on creating a pull request.
Testing Tips
- For reference, check out the
tests
folder from South Park example if your data is about text and object search example for images. - Try using the original example function by importing them to the test. Avoid any modifications to original Flow or logic.
- Use the pytest fixture
tmpdir
for temporary directory
Community
- Slack channel - a communication platform for developers to discuss Jina
- LinkedIn - get to know Jina AI as a company and find job opportunities
- follow us and interact with us using hashtag
#JinaSearch
- Company - know more about our company, we are fully committed to open-source!
License
Copyright (c) 2021 Jina AI Limited. All rights reserved.
Jina is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.