fixed a typo
Browse files
app.py
CHANGED
|
@@ -4,8 +4,13 @@ import streamlit as st
|
|
| 4 |
|
| 5 |
from lfqa import prepare, answer
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# %% ------------------------------------------- Creating Doc store
|
| 8 |
-
if not os.path.exists(
|
| 9 |
from haystack.document_stores import FAISSDocumentStore
|
| 10 |
from haystack.nodes import DensePassageRetriever
|
| 11 |
from haystack.utils import convert_files_to_docs, clean_wiki_text
|
|
@@ -14,9 +19,7 @@ if not os.path.exists(faiss_doc_store.db) or not os.path.exits(faiss_index.faiss
|
|
| 14 |
module_dir = os.path.dirname(os.path.abspath(__file__))
|
| 15 |
os.chdir(module_dir)
|
| 16 |
|
| 17 |
-
|
| 18 |
-
sql_file = 'faiss_doc_store.db'
|
| 19 |
-
faiss_file = 'faiss_index.faiss'
|
| 20 |
|
| 21 |
# %% Download/Load Docs
|
| 22 |
|
|
|
|
| 4 |
|
| 5 |
from lfqa import prepare, answer
|
| 6 |
|
| 7 |
+
|
| 8 |
+
doc_dir = "data/wiki_gameofthrones_txt12"
|
| 9 |
+
sql_file = 'faiss_doc_store.db'
|
| 10 |
+
faiss_file = 'faiss_index.faiss'
|
| 11 |
+
|
| 12 |
# %% ------------------------------------------- Creating Doc store
|
| 13 |
+
if not os.path.exists(sql_file) or not os.path.exits(faiss_file):
|
| 14 |
from haystack.document_stores import FAISSDocumentStore
|
| 15 |
from haystack.nodes import DensePassageRetriever
|
| 16 |
from haystack.utils import convert_files_to_docs, clean_wiki_text
|
|
|
|
| 19 |
module_dir = os.path.dirname(os.path.abspath(__file__))
|
| 20 |
os.chdir(module_dir)
|
| 21 |
|
| 22 |
+
|
|
|
|
|
|
|
| 23 |
|
| 24 |
# %% Download/Load Docs
|
| 25 |
|