Tuana commited on
Commit
86668bc
·
1 Parent(s): b6ac152

Moving the config to the top

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -16,16 +16,16 @@ reader = FARMReader(model_name_or_path="deepset/roberta-base-squad2", use_gpu=Tr
16
 
17
  pipeline = ExtractiveQAPipeline(reader, retriever)
18
 
 
 
 
 
19
  def ask_question(question):
20
  prediction = pipeline.run(query=question, params={"Retriever": {"top_k": 10}, "Reader": {"top_k": 5}})
21
  st.write(prediction['answers'][0])
22
  st.write(prediction['answers'][1])
23
  st.write(prediction['answers'][2])
24
 
25
- #Streamlit App
26
-
27
- st.set_page_config(page_title='Game of Thrones QA with Haystack')
28
-
29
  question = st.text_input(label="Ask a Question about Game of Thromes", value="Who is Arya's father?")
30
 
31
  if question:
 
16
 
17
  pipeline = ExtractiveQAPipeline(reader, retriever)
18
 
19
+ #Streamlit App
20
+
21
+ st.set_page_config(page_title='Game of Thrones QA with Haystack')
22
+
23
  def ask_question(question):
24
  prediction = pipeline.run(query=question, params={"Retriever": {"top_k": 10}, "Reader": {"top_k": 5}})
25
  st.write(prediction['answers'][0])
26
  st.write(prediction['answers'][1])
27
  st.write(prediction['answers'][2])
28
 
 
 
 
 
29
  question = st.text_input(label="Ask a Question about Game of Thromes", value="Who is Arya's father?")
30
 
31
  if question: