ankurmondal commited on
Commit
96b85d7
1 Parent(s): 976ec33

Upload extractor.py

Browse files
Files changed (1) hide show
  1. extractor.py +2 -2
extractor.py CHANGED
@@ -43,7 +43,7 @@ def _prompt(question):
43
  Context: """
44
 
45
 
46
- def _search(query, extractor, question=None):
47
  # Default question to query if empty
48
  if not question:
49
  question = query
@@ -89,6 +89,6 @@ async def rag(question: str):
89
 
90
  # Create extractor instance
91
  extractor = Extractor(embeddings, "google/flan-t5-base")
92
- answer = _search(question, extractor)
93
  # print(question, answer)
94
  return {answer}
 
43
  Context: """
44
 
45
 
46
+ async def _search(query, extractor, question=None):
47
  # Default question to query if empty
48
  if not question:
49
  question = query
 
89
 
90
  # Create extractor instance
91
  extractor = Extractor(embeddings, "google/flan-t5-base")
92
+ answer = await _search(question, extractor)
93
  # print(question, answer)
94
  return {answer}