Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
import streamlit as st
|
2 |
from streamlit_chat import message
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
# Initialize the CSVLoader to load the uploaded CSV file
|
4 |
from langchain.document_loaders.csv_loader import CSVLoader
|
5 |
# Allow users to upload a CSV file
|
@@ -17,13 +24,7 @@ if uploaded_file:
|
|
17 |
db.save_local(DB_FAISS_PATH)
|
18 |
llm = load_llm()
|
19 |
|
20 |
-
|
21 |
-
from langchain.embeddings import HuggingFaceEmbeddings
|
22 |
-
from langchain.vectorstores import FAISS
|
23 |
-
from langchain.llms import CTransformers
|
24 |
-
from langchain.memory import ConversationBufferMemory
|
25 |
-
from langchain.chains import ConversationalRetrievalChain
|
26 |
-
import sys
|
27 |
|
28 |
# Display the title of the web page
|
29 |
st.title("Chat with CSV using open source LLM Inference Point π¦π¦")
|
|
|
1 |
import streamlit as st
|
2 |
from streamlit_chat import message
|
3 |
+
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
4 |
+
from langchain.embeddings import HuggingFaceEmbeddings
|
5 |
+
from langchain.vectorstores import FAISS
|
6 |
+
from langchain.llms import CTransformers
|
7 |
+
from langchain.memory import ConversationBufferMemory
|
8 |
+
from langchain.chains import ConversationalRetrievalChain
|
9 |
+
import sys
|
10 |
# Initialize the CSVLoader to load the uploaded CSV file
|
11 |
from langchain.document_loaders.csv_loader import CSVLoader
|
12 |
# Allow users to upload a CSV file
|
|
|
24 |
db.save_local(DB_FAISS_PATH)
|
25 |
llm = load_llm()
|
26 |
|
27 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
# Display the title of the web page
|
30 |
st.title("Chat with CSV using open source LLM Inference Point π¦π¦")
|