thomasht86 commited on
Commit
0fce918
·
verified ·
1 Parent(s): d32c911

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. main.py +2 -0
main.py CHANGED
@@ -189,6 +189,8 @@ async def get(request, query: str, nn: bool = True):
189
  print(
190
  f"Search results fetched in {end - start:.2f} seconds, Vespa says searchtime was {result['timing']['searchtime']} seconds"
191
  )
 
 
192
  # Start generating the similarity map in the background
193
  asyncio.create_task(
194
  generate_similarity_map(
 
189
  print(
190
  f"Search results fetched in {end - start:.2f} seconds, Vespa says searchtime was {result['timing']['searchtime']} seconds"
191
  )
192
+ # Add result to cache
193
+ result_cache.set(query_id, result)
194
  # Start generating the similarity map in the background
195
  asyncio.create_task(
196
  generate_similarity_map(