Spaces:
Runtime error
Runtime error
Paul-Joshi
commited on
Commit
•
d364fe2
1
Parent(s):
eb780ca
Update app.py
Browse files
app.py
CHANGED
@@ -77,32 +77,18 @@ def main():
|
|
77 |
|
78 |
else:
|
79 |
# Input fields
|
80 |
-
st.
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
with st.spinner('Tokenizing and Embedding the Website Data'):
|
86 |
# get pdf text
|
87 |
raw_text = method_get_website_text(website_url)
|
88 |
# get the text chunks
|
89 |
doc_splits = method_get_text_chunks(raw_text)
|
90 |
# create vector store
|
91 |
vector_store = method_get_vectorstore(doc_splits)
|
92 |
-
|
93 |
-
# Input fields
|
94 |
-
question = st.text_input("Question")
|
95 |
-
|
96 |
-
# Button to process input and get output
|
97 |
-
if st.button('Query Documents'):
|
98 |
-
with st.spinner('Processing...'):
|
99 |
-
# # get pdf text
|
100 |
-
# raw_text = method_get_website_text(website_url)
|
101 |
-
# # get the text chunks
|
102 |
-
# doc_splits = method_get_text_chunks(raw_text)
|
103 |
-
# # create vector store
|
104 |
-
# vector_store = method_get_vectorstore(doc_splits)
|
105 |
-
# Generate response using the RAG pipeline
|
106 |
answer = get_context_retriever_chain(vector_store,question)
|
107 |
# Display the generated answer
|
108 |
split_string = "Question: " + str(question)
|
|
|
77 |
|
78 |
else:
|
79 |
# Input fields
|
80 |
+
question = st.text_input("Question")
|
81 |
+
|
82 |
+
# Button to process input and get output
|
83 |
+
if st.button('Query Documents'):
|
84 |
+
with st.spinner('Processing...'):
|
|
|
85 |
# get pdf text
|
86 |
raw_text = method_get_website_text(website_url)
|
87 |
# get the text chunks
|
88 |
doc_splits = method_get_text_chunks(raw_text)
|
89 |
# create vector store
|
90 |
vector_store = method_get_vectorstore(doc_splits)
|
91 |
+
Generate response using the RAG pipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
answer = get_context_retriever_chain(vector_store,question)
|
93 |
# Display the generated answer
|
94 |
split_string = "Question: " + str(question)
|