GithubHelp home page GithubHelp logo

semantic-search's Introduction

Semantic Search

Modification of CX_DB8 project by refactoring the code, adding user interface, and adding minor functional features.

Features

  • Asymmetric or Symmetric Supported Semantic Search with Average Attention from n-gram Scores using Sliding Window Algorithm.
  • Plug-and-Play Retriever Model & Reranker Model.
  • Text, Web, and Pdf Input to Text and Pdf Output format.
  • Output Highlighter.
  • Processing time & Score statistics.
  • Caching to speedup reprocessing (Click "Git remote repository sync" button/rerun notebook cell to clear unused data in RAM after repeated unique processing).
  • Raw results for inspecting.

Acknowledgements

Authors

Demo

demo

Walkthrough

  1. Get your ngrok Authentication Token.
  2. Create cell based on below Jupyter Notebook script in Kaggle or other alternatives.
#@title Semantic Search App
NGROK_TOKEN = "" #@param {type:"string"} 

%cd ~
!git clone https://github.com/muazhari/semantic-search.git
%cd ~/semantic-search/
!git fetch --all
!git reset --hard origin

!apt-get update -y
!yes | DEBIAN_FRONTEND=noninteractive apt-get install -yqq wkhtmltopdf xvfb libopenblas-dev libomp-dev poppler-utils openjdk-8-jdk jq

!pip install -r requirements.txt
!pip install pyngrok

!nvidia-smi

get_ipython().system_raw(f'ngrok authtoken {NGROK_TOKEN}')
get_ipython().system_raw('ngrok http 8501 &')
print("Open public URL:")
!curl -s http://localhost:4040/api/tunnels | jq ".tunnels[0].public_url"
!streamlit run ~/semantic-search/app.py

!sleep 10000000
  1. Submit your ngrok Authentication Token to NGROK_TOKEN coloumn in the cell form.
  2. Enable GPU in the Notebook.
  3. Run the cell.
  4. Wait until the setups are done.
  5. Open ngrok public URL.
  6. Use the app.

Warning

  • This repository not yet peer reviewed, so be careful when using it.

semantic-search's People

Contributors

muazhari avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.