Spaces:
Running
Running
Update deps
Browse files- app.py +6 -0
- requirements.txt +2 -1
app.py
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
import os
|
2 |
|
|
|
|
|
|
|
3 |
import streamlit as st
|
4 |
from langchain.chains import ConversationalRetrievalChain
|
5 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
@@ -9,6 +12,9 @@ from langchain_community.embeddings.openai import OpenAIEmbeddings
|
|
9 |
from langchain_community.vectorstores.chroma import Chroma
|
10 |
|
11 |
|
|
|
|
|
|
|
12 |
def load_and_process_file(file_data, openai_api_key):
|
13 |
"""
|
14 |
Load and process the uploaded file.
|
|
|
1 |
import os
|
2 |
|
3 |
+
__import__("pysqlite3")
|
4 |
+
import sys
|
5 |
+
|
6 |
import streamlit as st
|
7 |
from langchain.chains import ConversationalRetrievalChain
|
8 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
|
|
12 |
from langchain_community.vectorstores.chroma import Chroma
|
13 |
|
14 |
|
15 |
+
sys.modules["sqlite3"] = sys.modules.pop("pysqlite3")
|
16 |
+
|
17 |
+
|
18 |
def load_and_process_file(file_data, openai_api_key):
|
19 |
"""
|
20 |
Load and process the uploaded file.
|
requirements.txt
CHANGED
@@ -6,4 +6,5 @@ openai
|
|
6 |
tiktoken
|
7 |
pypdf
|
8 |
python-dotenv
|
9 |
-
docx2txt
|
|
|
|
6 |
tiktoken
|
7 |
pypdf
|
8 |
python-dotenv
|
9 |
+
docx2txt
|
10 |
+
pysqlite3-binary
|