krunakuamar commited on
Commit
98ec77e
1 Parent(s): 1718ab1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -172,15 +172,15 @@ async def process_mask(idx, mask_i, boxes, probs, yolo_model, blank_image, cls):
172
  return dictionary_seg
173
 
174
 
175
- @app.middleware("http")
176
- async def check_auth_header(request: Request, call_next):
177
-
178
- token = request.headers.get('Authorization')
179
- if token != os.environ.get("SECRET"):
180
- return JSONResponse(content={'error': 'Authorization header missing or incorrect.'}, status_code=403)
181
- else:
182
- response = await call_next(request)
183
- return response
184
 
185
 
186
  @app.post("/api/mask")
 
172
  return dictionary_seg
173
 
174
 
175
+ # @app.middleware("http")
176
+ # async def check_auth_header(request: Request, call_next):
177
+
178
+ # token = request.headers.get('Authorization')
179
+ # if token != os.environ.get("SECRET"):
180
+ # return JSONResponse(content={'error': 'Authorization header missing or incorrect.'}, status_code=403)
181
+ # else:
182
+ # response = await call_next(request)
183
+ # return response
184
 
185
 
186
  @app.post("/api/mask")