Hamish commited on
Commit
91052d4
1 Parent(s): ba93d3e
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -123,10 +123,10 @@ if openai_key:
123
  # for doc in docs:
124
  # st.write(str(doc.metadata["page"]) + ":", doc.page_content[:300])
125
 
126
- qa_prompt = st.text_area("Query your pdf", value="How will the community be engaged?", 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 and qa_button:
130
 
131
  qa = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=faiss_index.as_retriever())
132
- st.write(qa("How will the community be engaged?"))
 
123
  # for doc in docs:
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 and qa_button:
130
 
131
  qa = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=faiss_index.as_retriever())
132
+ st.write(qa(qa_prompt))