mahynski commited on
Commit
0d88b0c
1 Parent(s): a59692f

updated prompt

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -130,7 +130,7 @@ def main():
130
 
131
  1. Obtain an [API Key](https://cloud.llamaindex.ai/api-key) from LlamaParse to parse your document.
132
  2. Obtain a similar API Key from your preferred LLM provider.
133
- 3. Make selections at the left and upload a document to use a context.
134
  4. Begin asking questions below!
135
  """
136
  )
@@ -144,7 +144,9 @@ def main():
144
  value=prompt_txt
145
  )
146
 
147
- if parsed_document is not None:
 
 
148
  index = VectorStoreIndex.from_documents(parsed_document)
149
  query_engine = index.as_query_engine()
150
  response = query_engine.query(prompt)
 
130
 
131
  1. Obtain an [API Key](https://cloud.llamaindex.ai/api-key) from LlamaParse to parse your document.
132
  2. Obtain a similar API Key from your preferred LLM provider.
133
+ 3. Make selections at the left and upload a document to use as context.
134
  4. Begin asking questions below!
135
  """
136
  )
 
144
  value=prompt_txt
145
  )
146
 
147
+ run = st.button("Answer", type="primary")
148
+
149
+ if parsed_document is not None and run:
150
  index = VectorStoreIndex.from_documents(parsed_document)
151
  query_engine = index.as_query_engine()
152
  response = query_engine.query(prompt)