Spaces:
Runtime error
Runtime error
Vivien Chappelier
commited on
Commit
Β·
2880299
1
Parent(s):
74ae0b4
check auth is properly set
Browse files
app.py
CHANGED
|
@@ -97,9 +97,11 @@ class BZHStableSignatureDemo(object):
|
|
| 97 |
}
|
| 98 |
|
| 99 |
headers = {}
|
| 100 |
-
api_key = os.
|
|
|
|
| 101 |
if api_key:
|
| 102 |
headers['BZH_API_KEY'] = api_key
|
|
|
|
| 103 |
response = requests.post('https://bzh.imatag.com/bzh/api/v1.0/detect',
|
| 104 |
json=data, headers=headers)
|
| 105 |
response.raise_for_status()
|
|
|
|
| 97 |
}
|
| 98 |
|
| 99 |
headers = {}
|
| 100 |
+
api_key = os.getenv('BZH_API_KEY')
|
| 101 |
+
print("api_key = ", api_key)
|
| 102 |
if api_key:
|
| 103 |
headers['BZH_API_KEY'] = api_key
|
| 104 |
+
print("headers = ", headers)
|
| 105 |
response = requests.post('https://bzh.imatag.com/bzh/api/v1.0/detect',
|
| 106 |
json=data, headers=headers)
|
| 107 |
response.raise_for_status()
|