mtyrrell commited on
Commit
08b14ba
1 Parent(s): aac551e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -37,7 +37,7 @@ Context: {' - '.join(['&&& '+d.meta['document_name']+' ref. '+str(d.meta['ref_id
37
  model_options = ['chatGPT','Llama2']
38
 
39
  # Create a list of options for the dropdown
40
- country_options = ['Angola','Botswana','Lesotho','Kenya','Malawi','Mozambique','Namibia','Rwanda','South Africa','Zambia','Zimbabwe']
41
 
42
  # List of examples
43
  examples = [
@@ -51,10 +51,10 @@ def get_docs(input_query, country = None):
51
  Construct a hacky query to focus the retriever on the target country (see notes below)
52
  We take the top 150 k because we want to make sure we have 10 pertaining to the selected country
53
  '''
54
- if country:
55
- query = "For the country of "+country+", "+input_query
56
- else:
57
  query = input_query
 
 
58
  # Retrieve top k documents
59
  docs = retriever.retrieve(query=query,top_k = 150)
60
  # Break out the key fields and convert to pandas for filtering
 
37
  model_options = ['chatGPT','Llama2']
38
 
39
  # Create a list of options for the dropdown
40
+ country_options = ['ALL','Angola','Botswana','Lesotho','Kenya','Malawi','Mozambique','Namibia','Rwanda','South Africa','Zambia','Zimbabwe']
41
 
42
  # List of examples
43
  examples = [
 
51
  Construct a hacky query to focus the retriever on the target country (see notes below)
52
  We take the top 150 k because we want to make sure we have 10 pertaining to the selected country
53
  '''
54
+ if country == 'ALL':
 
 
55
  query = input_query
56
+ else:
57
+ query = "For the country of "+country+", "+input_query
58
  # Retrieve top k documents
59
  docs = retriever.retrieve(query=query,top_k = 150)
60
  # Break out the key fields and convert to pandas for filtering