Move application files under src directory. Update Readmes

- Remove callign asymmetric search script directly command.
  It doesn't work anymore on calling directly due to internal package
  import issues
This commit is contained in:
Debanjum Singh Solanky 2021-08-17 01:25:12 -07:00
parent c35c6fb0b3
commit af9660f28e
16 changed files with 3 additions and 13 deletions

View file

@ -1,7 +1,7 @@
* Semantic Search
/Allow natural language search on user content like notes, images using transformer based models/
All data is processed locally. User can interface with semantic-search app via [[./interface/emacs/semantic-search.el][Emacs]], API or Commandline
All data is processed locally. User can interface with semantic-search app via [[./src/interface/emacs/semantic-search.el][Emacs]], API or Commandline
** Dependencies
- Python3
@ -18,12 +18,12 @@
Load ML model, generate embeddings and expose API to query specified org-mode files
#+begin_src shell
python3 main.py --input-files ~/Notes/Schedule.org ~/Notes/Incoming.org --verbose
python3 src/main.py --input-files ~/Notes/Schedule.org ~/Notes/Incoming.org --verbose
#+end_src
** Use
- *Semantic Search via Emacs*
- [[https://github.com/debanjum/semantic-search/tree/master/interface/emacs#installation][Install]] [[./interface/emacs/semantic-search.el][semantic-search.el]]
- [[https://github.com/debanjum/semantic-search/tree/master/src/interface/emacs#installation][Install]] [[./src/interface/emacs/semantic-search.el][semantic-search.el]]
- Run ~M-x semantic-search <user-query>~ or Call ~C-c C-s~
- *Semantic Search via API*
@ -31,16 +31,6 @@
- Regenerate Embeddings: ~GET~ [[http://localhost:8000/regenerate][http://localhost:8000/regenerate]]
- [[http://localhost:8000/docs][Semantic Search API Docs]]
- *Call Semantic Search via Python Script Directly*
#+begin_src shell
python3 search_types/asymmetric.py \
--compressed-jsonl .notes.jsonl.gz \
--embeddings .notes_embeddings.pt \
--results-count 5 \
--verbose \
--interactive
#+end_src
** Acknowledgments
- [[https://huggingface.co/sentence-transformers/msmarco-MiniLM-L-6-v3][MiniLM Model]] for Asymmetric Text Search. See [[https://www.sbert.net/examples/applications/retrieve_rerank/README.html][SBert Documentation]]
- [[https://github.com/openai/CLIP][OpenAI CLIP Model]] for Image Search. See [[https://www.sbert.net/examples/applications/image-search/README.html][SBert Documentation]]

0
src/utils/__init__.py Normal file
View file