Mbonea commited on
Commit
60dc117
1 Parent(s): b407c2c
Files changed (2) hide show
  1. .gitignore +1 -0
  2. App/Embedding/EmbeddingRoutes.py +4 -3
.gitignore CHANGED
@@ -2,3 +2,4 @@
2
  *.session
3
  *.session-journal
4
  .env
 
 
2
  *.session
3
  *.session-journal
4
  .env
5
+ Secrets.md
App/Embedding/EmbeddingRoutes.py CHANGED
@@ -4,8 +4,8 @@ from fastapi import APIRouter, BackgroundTasks
4
  from .Schemas import SearchRequest, AddDocumentRequest, TrendingRequest
5
  import redis, os, json
6
 
7
- REDIS = os.environ.get("REDIS")
8
- cache = redis.from_url(REDIS)
9
 
10
 
11
  embeddigs_router = APIRouter(tags=["embeddings"])
@@ -28,7 +28,8 @@ async def search_id(
28
  background_tasks: BackgroundTasks,
29
  ):
30
  # return []
31
- data = cache.get(f"recommendations:{req.query}")
 
32
  if data is not None:
33
  return json.loads(data)
34
  else:
 
4
  from .Schemas import SearchRequest, AddDocumentRequest, TrendingRequest
5
  import redis, os, json
6
 
7
+ REDIS = os.environ.get("REDIS", "ASD")
8
+ # cache = redis.from_url(REDIS)
9
 
10
 
11
  embeddigs_router = APIRouter(tags=["embeddings"])
 
28
  background_tasks: BackgroundTasks,
29
  ):
30
  # return []
31
+ # data = cache.get(f"recommendations:{req.query}")
32
+ data = []
33
  if data is not None:
34
  return json.loads(data)
35
  else: