geqintan commited on
Commit
e0922e7
·
1 Parent(s): 7515fd1
Files changed (1) hide show
  1. app.py +0 -5
app.py CHANGED
@@ -34,10 +34,6 @@ class EmbeddingRequest(BaseModel):
34
 
35
  @app.post("/v1/embeddings")
36
  async def embeddings(request:EmbeddingRequest, authorization: str = Depends(check_authorization)):
37
- # async def embeddings(request: EmbeddingRequest):
38
- # logger.info("Received request for embeddings")
39
- # return '2222222222'
40
- # return request.input
41
  input = request.input
42
 
43
  try:
@@ -53,7 +49,6 @@ async def embeddings(request:EmbeddingRequest, authorization: str = Depends(chec
53
  }
54
 
55
  # Calculate embeddings
56
- # embeddings = model.encode(input)
57
  embeddings = model.encode(input, normalize_embeddings=True)
58
 
59
  # Format the embeddings in OpenAI compatible format
 
34
 
35
  @app.post("/v1/embeddings")
36
  async def embeddings(request:EmbeddingRequest, authorization: str = Depends(check_authorization)):
 
 
 
 
37
  input = request.input
38
 
39
  try:
 
49
  }
50
 
51
  # Calculate embeddings
 
52
  embeddings = model.encode(input, normalize_embeddings=True)
53
 
54
  # Format the embeddings in OpenAI compatible format