Spaces:
Runtime error
Runtime error
iamviveksrk
commited on
Commit
•
a4be1d0
1
Parent(s):
9e322f9
added random question button
Browse files
app.py
CHANGED
@@ -50,6 +50,7 @@ This QA demo uses a [Haystack Extractive QA Pipeline](https://haystack.deepset.a
|
|
50 |
an [InMemoryDocumentStore](https://haystack.deepset.ai/components/document-store) which contains abstracts of 17k+ research papers associated with SRM university.''')
|
51 |
|
52 |
query = st.text_input('Enter a query to get started:', value=st.session_state.question, max_chars=100, on_change=reset_results)
|
|
|
53 |
|
54 |
def ask_question(query):
|
55 |
start = time.time()
|
|
|
50 |
an [InMemoryDocumentStore](https://haystack.deepset.ai/components/document-store) which contains abstracts of 17k+ research papers associated with SRM university.''')
|
51 |
|
52 |
query = st.text_input('Enter a query to get started:', value=st.session_state.question, max_chars=100, on_change=reset_results)
|
53 |
+
st.button('Random Question', on_click=lambda:st.session_state['question']=choice(queries))
|
54 |
|
55 |
def ask_question(query):
|
56 |
start = time.time()
|