bstraehle commited on
Commit
120d45f
·
verified ·
1 Parent(s): aabb4c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -28,18 +28,18 @@ def invoke(openai_api_key, prompt, rag_option):
28
  if (RAG_INGESTION):
29
  return rag_ingestion(collection)
30
  else:
31
- """
32
  match_stage = {
33
  "$match": {
34
- "address.country": re.compile(r"United States"),
35
  "accommodates": { "$gt": 1, "$lt": 3}
36
  }
37
  }
38
 
39
  additional_stages = [match_stage]
40
- """
41
-
42
- search_results = rag_retrieval(openai_api_key, prompt, db, collection)
43
  return rag_inference(openai_api_key, prompt, search_results)
44
 
45
  gr.close_all()
 
28
  if (RAG_INGESTION):
29
  return rag_ingestion(collection)
30
  else:
31
+ ###
32
  match_stage = {
33
  "$match": {
34
+ "address.market": re.compile(r"San Francisco"),
35
  "accommodates": { "$gt": 1, "$lt": 3}
36
  }
37
  }
38
 
39
  additional_stages = [match_stage]
40
+ ###
41
+
42
+ search_results = rag_retrieval(openai_api_key, prompt, db, collection, additional_stages)
43
  return rag_inference(openai_api_key, prompt, search_results)
44
 
45
  gr.close_all()