mahynski commited on
Commit
24df29b
·
1 Parent(s): eb70b82
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -131,6 +131,21 @@ with col1:
131
  """
132
  )
133
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  with col2:
135
  tab1, tab2 = st.tabs(["Uploaded File", "Parsed File",])
136
 
 
131
  """
132
  )
133
 
134
+ st.divider()
135
+
136
+ index = VectorStoreIndex.from_documents(parsed_document)
137
+ query_engine = index.as_query_engine()
138
+
139
+ prompt_txt = 'Summarize this document in a 3-5 sentences.'
140
+ prompt = st.text_area(
141
+ label="Enter you query.",
142
+ key="prompt_widget",
143
+ value=prompt_txt
144
+ )
145
+
146
+ response = qa_engine.query(prompt)
147
+ st.write(response.response)
148
+
149
  with col2:
150
  tab1, tab2 = st.tabs(["Uploaded File", "Parsed File",])
151