Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -43,11 +43,6 @@ def parse(data):
|
|
43 |
|
44 |
@app.post("/embeddings/")
|
45 |
async def get_embedding(embedding: Embedding, req: Request):
|
46 |
-
|
47 |
-
token = req.headers.get("Authorization")
|
48 |
-
if os.environ.get('token') != token[7:]:
|
49 |
-
raise HTTPException(status_code=401, detail="Unauthorized.")
|
50 |
-
|
51 |
if model == None:
|
52 |
raise HTTPException(status_code=400, detail="Model load failed.")
|
53 |
|
|
|
43 |
|
44 |
@app.post("/embeddings/")
|
45 |
async def get_embedding(embedding: Embedding, req: Request):
|
|
|
|
|
|
|
|
|
|
|
46 |
if model == None:
|
47 |
raise HTTPException(status_code=400, detail="Model load failed.")
|
48 |
|