Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
from langchain.document_loaders.csv_loader import CSVLoader
|
2 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
3 |
from langchain.embeddings import HuggingFaceEmbeddings
|
@@ -40,10 +41,10 @@ llm = CTransformers(model="models/llama-2-7b-chat.ggmlv3.q4_0.bin",
|
|
40 |
|
41 |
qa = ConversationalRetrievalChain.from_llm(llm, retriever=docsearch.as_retriever())
|
42 |
|
43 |
-
|
44 |
chat_history = []
|
45 |
#query = "What is the value of GDP per capita of Finland provided in the data?"
|
46 |
-
query =
|
47 |
if query == 'exit':
|
48 |
print('Exiting')
|
49 |
sys.exit()
|
|
|
1 |
+
import streamlit as st
|
2 |
from langchain.document_loaders.csv_loader import CSVLoader
|
3 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
4 |
from langchain.embeddings import HuggingFaceEmbeddings
|
|
|
41 |
|
42 |
qa = ConversationalRetrievalChain.from_llm(llm, retriever=docsearch.as_retriever())
|
43 |
|
44 |
+
if st.button("Submit Query"):
|
45 |
chat_history = []
|
46 |
#query = "What is the value of GDP per capita of Finland provided in the data?"
|
47 |
+
query = st.text_input("Input Prompt:")
|
48 |
if query == 'exit':
|
49 |
print('Exiting')
|
50 |
sys.exit()
|