Spaces:
Sleeping
Sleeping
Removed authentification
Browse files
app.py
CHANGED
|
@@ -50,10 +50,7 @@ def healthz():
|
|
| 50 |
return {"ok": True}
|
| 51 |
|
| 52 |
@app.post("/predict", response_model=Response)
|
| 53 |
-
def predict(request: Request
|
| 54 |
-
if not API_KEY or authorization != f"Bearer {API_KEY}":
|
| 55 |
-
raise HTTPException(status_code=401, detail="Unauthorized")
|
| 56 |
-
|
| 57 |
predictions = predict_func(request.smiles)
|
| 58 |
return {"predictions": predictions, "model_info": {"name":"random_clf", "version":"1.0.0"}}
|
| 59 |
|
|
|
|
| 50 |
return {"ok": True}
|
| 51 |
|
| 52 |
@app.post("/predict", response_model=Response)
|
| 53 |
+
def predict(request: Request):
|
|
|
|
|
|
|
|
|
|
| 54 |
predictions = predict_func(request.smiles)
|
| 55 |
return {"predictions": predictions, "model_info": {"name":"random_clf", "version":"1.0.0"}}
|
| 56 |
|