Update app.py
Browse files
app.py
CHANGED
@@ -3,11 +3,12 @@ import requests
|
|
3 |
from PIL import Image
|
4 |
from io import BytesIO
|
5 |
import numpy as np
|
|
|
6 |
from landingai.common import decode_bitmap_rle
|
7 |
-
import
|
8 |
|
9 |
ENDPOINT_ID = "ba678fa4-65d1-4b87-8c85-cebd15224783"
|
10 |
-
API_KEY = "land_sk_ikq7WEKGtaKI7pXIcKt2x7RoyYE6FBReqGOmKtEhjcmFbLbQsK"
|
11 |
API_URL = f"https://predict.app.landing.ai/inference/v1/predict?endpoint_id={ENDPOINT_ID}"
|
12 |
|
13 |
def predict_from_landinglens(image_path):
|
|
|
3 |
from PIL import Image
|
4 |
from io import BytesIO
|
5 |
import numpy as np
|
6 |
+
import re
|
7 |
from landingai.common import decode_bitmap_rle
|
8 |
+
import os # For accessing secrets
|
9 |
|
10 |
ENDPOINT_ID = "ba678fa4-65d1-4b87-8c85-cebd15224783"
|
11 |
+
API_KEY = os.environ.get("land_sk_ikq7WEKGtaKI7pXIcKt2x7RoyYE6FBReqGOmKtEhjcmFbLbQsK")
|
12 |
API_URL = f"https://predict.app.landing.ai/inference/v1/predict?endpoint_id={ENDPOINT_ID}"
|
13 |
|
14 |
def predict_from_landinglens(image_path):
|