Spaces:
Sleeping
Sleeping
oops2
Browse files
app.py
CHANGED
@@ -124,9 +124,9 @@ if openai_key:
|
|
124 |
# st.write(str(doc.metadata["page"]) + ":", doc.page_content[:300])
|
125 |
|
126 |
qa_prompt = st.text_area("Query your pdf", key="qa_prompt")
|
127 |
-
qa_button = st.button("Let's go!", disabled=not (openai_key and qa_prompt), key="qa_button", help="Make sure you have entered your OpenAI API key and a query.")
|
128 |
|
129 |
-
if qa_prompt
|
130 |
|
131 |
qa = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=faiss_index.as_retriever())
|
132 |
st.write(qa(qa_prompt))
|
|
|
124 |
# st.write(str(doc.metadata["page"]) + ":", doc.page_content[:300])
|
125 |
|
126 |
qa_prompt = st.text_area("Query your pdf", key="qa_prompt")
|
127 |
+
# qa_button = st.button("Let's go!", disabled=not (openai_key and qa_prompt), key="qa_button", help="Make sure you have entered your OpenAI API key and a query.")
|
128 |
|
129 |
+
if qa_prompt:
|
130 |
|
131 |
qa = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=faiss_index.as_retriever())
|
132 |
st.write(qa(qa_prompt))
|