NHZ commited on
Commit
aa9ff60
·
verified ·
1 Parent(s): 7f026ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -102,4 +102,14 @@ if text:
102
  )
103
 
104
  # Create a RetrievalQA chain
105
- qa_chain =
 
 
 
 
 
 
 
 
 
 
 
102
  )
103
 
104
  # Create a RetrievalQA chain
105
+ qa_chain = RetrievalQA(
106
+ retriever=retriever,
107
+ llm=llm,
108
+ prompt=prompt_template
109
+ )
110
+
111
+ # Run the query through the QA chain
112
+ result = qa_chain.run(query)
113
+ st.write("Answer:", result)
114
+ else:
115
+ st.error("Failed to extract content from the document.")