stmnk commited on
Commit
3e728c2
1 Parent(s): 79a2228

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,13 +18,13 @@ if st.button('Run keyword search'):
18
  }}})
19
  headers = {'Content-Type': 'application/json'}
20
  response = requests.request("GET", url, headers=headers, data=payload)
21
- qa_result = response.json() # print(response.text)
22
  # qa_result = pipe_exqa(question=question, context=paragraph)
23
 
24
  except Exception as e:
25
  qa_result = str(e)
26
 
27
- top_5_hits = result['hits']['hits'][:5] # print("First 5 results:")
28
  top_5_text = [{'text': hit['_source']['content'][:500],
29
  'confidence': hit['_score']} for hit in top_5_hits ]
30
 
 
18
  }}})
19
  headers = {'Content-Type': 'application/json'}
20
  response = requests.request("GET", url, headers=headers, data=payload)
21
+ kws_result = response.json() # print(response.text)
22
  # qa_result = pipe_exqa(question=question, context=paragraph)
23
 
24
  except Exception as e:
25
  qa_result = str(e)
26
 
27
+ top_5_hits = kws_result['hits']['hits'][:5] # print("First 5 results:")
28
  top_5_text = [{'text': hit['_source']['content'][:500],
29
  'confidence': hit['_score']} for hit in top_5_hits ]
30