Spaces:
Build error
Build error
testing secret
Browse files
app.py
CHANGED
@@ -43,15 +43,11 @@ def main(image_path, threshold, api):
|
|
43 |
|
44 |
# load secret
|
45 |
apiKey = st.secrets["Api-Key"]
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
# Image.fromarray(foreground)
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
# unify image channels to 3
|
56 |
if len(im.shape) == 2:
|
57 |
im = im[:, :, None]
|
|
|
43 |
|
44 |
# load secret
|
45 |
apiKey = st.secrets["Api-Key"]
|
46 |
+
if apiKey != api
|
47 |
+
image = Image.open(image_path)
|
48 |
+
image = np.asarray(image)
|
49 |
+
Image.fromarray(foreground)
|
50 |
+
|
|
|
|
|
|
|
|
|
51 |
# unify image channels to 3
|
52 |
if len(im.shape) == 2:
|
53 |
im = im[:, :, None]
|