amartyasaran commited on
Commit
7585d9c
1 Parent(s): d6ee819

Docstore Change

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. requirements.txt +4 -8
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import json
2
  import streamlit as st
3
- from haystack.document_stores import FAISSDocumentStore
4
  from haystack.document_stores import InMemoryDocumentStore
5
  from transformers import DPRContextEncoder, DPRContextEncoderTokenizer
6
  from haystack.nodes import DensePassageRetriever
@@ -22,8 +22,8 @@ documents = [
22
  } for doc in data
23
  ]
24
 
25
- document_store = FAISSDocumentStore(embedding_dim=768, faiss_index_factory_str="Flat")
26
- # document_store = InMemoryDocumentStore()
27
  document_store.write_documents(documents)
28
 
29
  retriever = DensePassageRetriever(
 
1
  import json
2
  import streamlit as st
3
+ # from haystack.document_stores import FAISSDocumentStore
4
  from haystack.document_stores import InMemoryDocumentStore
5
  from transformers import DPRContextEncoder, DPRContextEncoderTokenizer
6
  from haystack.nodes import DensePassageRetriever
 
22
  } for doc in data
23
  ]
24
 
25
+ # document_store = FAISSDocumentStore(embedding_dim=768, faiss_index_factory_str="Flat")
26
+ document_store = InMemoryDocumentStore()
27
  document_store.write_documents(documents)
28
 
29
  retriever = DensePassageRetriever(
requirements.txt CHANGED
@@ -1,8 +1,4 @@
1
- streamlit
2
- faiss-cpu
3
- transformers
4
- sentence-transformers
5
- scikit-learn
6
- farm-haystack
7
- farm-haystack[faiss]
8
- farm-haystack[inference]
 
1
+ farm-haystack
2
+ transformers
3
+ farm-haystack[inference]
4
+ sentence-transformers