Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -31,13 +31,13 @@ class GetProduct:
|
|
31 |
creds = service_account.Credentials.from_service_account_info(credentials)
|
32 |
self.client = vision.ImageAnnotatorClient(credentials=creds)
|
33 |
|
34 |
-
def inference(self, cropped_image
|
35 |
annotations = self.annotate_image(cropped_image)
|
36 |
selected_images = self.report(annotations)
|
37 |
|
38 |
return selected_images
|
39 |
|
40 |
-
def annotate_image(self, image
|
41 |
|
42 |
buffer = BytesIO()
|
43 |
# Convert the image to RGB mode if it is RGBA
|
|
|
31 |
creds = service_account.Credentials.from_service_account_info(credentials)
|
32 |
self.client = vision.ImageAnnotatorClient(credentials=creds)
|
33 |
|
34 |
+
def inference(self, cropped_image) -> list:
|
35 |
annotations = self.annotate_image(cropped_image)
|
36 |
selected_images = self.report(annotations)
|
37 |
|
38 |
return selected_images
|
39 |
|
40 |
+
def annotate_image(self, image):
|
41 |
|
42 |
buffer = BytesIO()
|
43 |
# Convert the image to RGB mode if it is RGBA
|