amqdn commited on
Commit
1edc844
β€’
1 Parent(s): f1f696d

update default query and format

Browse files
Files changed (1) hide show
  1. app.py +7 -9
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
- col1, col2 = st.columns(2)
46
- with col1:
47
- response = shakespeare_qa.run(st.text_input(
48
- 'Query',
49
- help='Ask a question pertaining to Shakespeare\'s plays.',
50
- placeholder='What is the name of Hamlet\'s mother?'
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}')