Spaces:
Running
on
T4
Running
on
T4
Upload folder using huggingface_hub
Browse files
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(
|