Update app.py
Browse files
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 = ['
|
| 41 |
|
| 42 |
# List of examples
|
| 43 |
examples = [
|
|
@@ -60,7 +60,7 @@ def get_docs(input_query, country = None):
|
|
| 60 |
# Break out the key fields and convert to pandas for filtering
|
| 61 |
docs = [{**x.meta,"score":x.score,"content":x.content} for x in docs]
|
| 62 |
df_docs = pd.DataFrame(docs)
|
| 63 |
-
if country != '
|
| 64 |
df_docs = df_docs.query('country in @country')
|
| 65 |
# Take the top 10
|
| 66 |
df_docs = df_docs.head(10)
|
|
|
|
| 37 |
model_options = ['chatGPT','Llama2']
|
| 38 |
|
| 39 |
# Create a list of options for the dropdown
|
| 40 |
+
country_options = ['All Countries','Angola','Botswana','Lesotho','Kenya','Malawi','Mozambique','Namibia','Rwanda','South Africa','Zambia','Zimbabwe']
|
| 41 |
|
| 42 |
# List of examples
|
| 43 |
examples = [
|
|
|
|
| 60 |
# Break out the key fields and convert to pandas for filtering
|
| 61 |
docs = [{**x.meta,"score":x.score,"content":x.content} for x in docs]
|
| 62 |
df_docs = pd.DataFrame(docs)
|
| 63 |
+
if country != 'All Countries':
|
| 64 |
df_docs = df_docs.query('country in @country')
|
| 65 |
# Take the top 10
|
| 66 |
df_docs = df_docs.head(10)
|