Spaces:
Sleeping
Sleeping
update default query and format
Browse files
app.py
CHANGED
@@ -42,12 +42,10 @@ db = Chroma.from_documents(documents, embeddings)
|
|
42 |
shakespeare_qa = RetrievalQA.from_chain_type(llm=llm, chain_type='stuff', retriever=db.as_retriever())
|
43 |
|
44 |
# Query
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
with col2:
|
53 |
-
st.write(f'π {response}')
|
|
|
42 |
shakespeare_qa = RetrievalQA.from_chain_type(llm=llm, chain_type='stuff', retriever=db.as_retriever())
|
43 |
|
44 |
# Query
|
45 |
+
response = shakespeare_qa.run(st.text_input(
|
46 |
+
'Query',
|
47 |
+
value='What is the name of Hamlet\'s mother?',
|
48 |
+
help='Ask a question pertaining to Shakespeare\'s plays.'
|
49 |
+
))
|
50 |
+
'---'
|
51 |
+
st.write(f'π {response}')
|
|
|
|