Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,9 +67,6 @@ def predict_from_json(payload, x_api_key: str = ""):
|
|
| 67 |
{ ...feature: value... }
|
| 68 |
or [ { ...feature: value... } ] (unwrap common API client shape)
|
| 69 |
"""
|
| 70 |
-
# Optional simple API key
|
| 71 |
-
if API_KEY and x_api_key.strip() != API_KEY:
|
| 72 |
-
return {"error": "Unauthorized: missing or invalid X-API-Key header"}
|
| 73 |
|
| 74 |
# Unwrap if list-of-one was sent
|
| 75 |
if isinstance(payload, list) and len(payload) == 1 and isinstance(payload[0], dict):
|
|
|
|
| 67 |
{ ...feature: value... }
|
| 68 |
or [ { ...feature: value... } ] (unwrap common API client shape)
|
| 69 |
"""
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
# Unwrap if list-of-one was sent
|
| 72 |
if isinstance(payload, list) and len(payload) == 1 and isinstance(payload[0], dict):
|