Spaces:
Sleeping
Sleeping
diegokauer
commited on
Commit
•
66fad5c
1
Parent(s):
4d2b9b6
Update model.py
Browse files
model.py
CHANGED
@@ -13,10 +13,6 @@ from PIL import Image
|
|
13 |
|
14 |
from creds import get_credentials
|
15 |
|
16 |
-
# pass
|
17 |
-
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = get_credentials()
|
18 |
-
print(get_credentials())
|
19 |
-
|
20 |
|
21 |
def generate_download_signed_url_v4(blob_name):
|
22 |
"""Generates a v4 signed URL for downloading a blob.
|
@@ -50,6 +46,9 @@ class Model(LabelStudioMLBase):
|
|
50 |
|
51 |
image_processor = AutoImageProcessor.from_pretrained("diegokauer/conditional-detr-coe-int")
|
52 |
model = AutoModelForObjectDetection.from_pretrained("diegokauer/conditional-detr-coe-int")
|
|
|
|
|
|
|
53 |
|
54 |
def predict(self, tasks, **kwargs):
|
55 |
""" This is where inference happens: model returns
|
|
|
13 |
|
14 |
from creds import get_credentials
|
15 |
|
|
|
|
|
|
|
|
|
16 |
|
17 |
def generate_download_signed_url_v4(blob_name):
|
18 |
"""Generates a v4 signed URL for downloading a blob.
|
|
|
46 |
|
47 |
image_processor = AutoImageProcessor.from_pretrained("diegokauer/conditional-detr-coe-int")
|
48 |
model = AutoModelForObjectDetection.from_pretrained("diegokauer/conditional-detr-coe-int")
|
49 |
+
# pass
|
50 |
+
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = get_credentials()
|
51 |
+
print(get_credentials())
|
52 |
|
53 |
def predict(self, tasks, **kwargs):
|
54 |
""" This is where inference happens: model returns
|