Spaces:
Running
Running
fix sqlite3 and chroma problem in streamlit.io
Browse files- document_qa/document_qa_engine.py +5 -0
- requirements.txt +1 -0
document_qa/document_qa_engine.py
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
import copy
|
2 |
import os
|
3 |
from pathlib import Path
|
@@ -16,6 +20,7 @@ from langchain.vectorstores import Chroma
|
|
16 |
from tqdm import tqdm
|
17 |
|
18 |
|
|
|
19 |
class DocumentQAEngine:
|
20 |
llm = None
|
21 |
qa_chain_type = None
|
|
|
1 |
+
__import__('pysqlite3')
|
2 |
+
import sys
|
3 |
+
sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
|
4 |
+
|
5 |
import copy
|
6 |
import os
|
7 |
from pathlib import Path
|
|
|
20 |
from tqdm import tqdm
|
21 |
|
22 |
|
23 |
+
|
24 |
class DocumentQAEngine:
|
25 |
llm = None
|
26 |
qa_chain_type = None
|
requirements.txt
CHANGED
@@ -16,6 +16,7 @@ dateparser
|
|
16 |
|
17 |
# LLM
|
18 |
chromadb==0.4.19
|
|
|
19 |
tiktoken==0.4.0
|
20 |
openai==0.27.7
|
21 |
langchain==0.0.350
|
|
|
16 |
|
17 |
# LLM
|
18 |
chromadb==0.4.19
|
19 |
+
pysqlite3-binary
|
20 |
tiktoken==0.4.0
|
21 |
openai==0.27.7
|
22 |
langchain==0.0.350
|