Spaces:
Sleeping
Sleeping
Commit
·
c38e7cf
1
Parent(s):
a06c3a6
Update model.py
Browse files
model.py
CHANGED
|
@@ -43,6 +43,7 @@ class Model(LabelStudioMLBase):
|
|
| 43 |
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = get_credentials()
|
| 44 |
image_processor = AutoImageProcessor.from_pretrained("diegokauer/conditional-detr-coe-int")
|
| 45 |
model = AutoModelForObjectDetection.from_pretrained("diegokauer/conditional-detr-coe-int")
|
|
|
|
| 46 |
|
| 47 |
def predict(self, tasks, **kwargs):
|
| 48 |
""" This is where inference happens: model returns
|
|
|
|
| 43 |
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = get_credentials()
|
| 44 |
image_processor = AutoImageProcessor.from_pretrained("diegokauer/conditional-detr-coe-int")
|
| 45 |
model = AutoModelForObjectDetection.from_pretrained("diegokauer/conditional-detr-coe-int")
|
| 46 |
+
id2label = model.config.id2label
|
| 47 |
|
| 48 |
def predict(self, tasks, **kwargs):
|
| 49 |
""" This is where inference happens: model returns
|