def read_ingredients() -> str:
vision_client = vision.ImageAnnotatorClient()
with io.open("/home/bajajnehaa/healthy_hints/images/Ingredients-list.jpg", 'rb') as image_file:
content = image_file.read()
image = vision.Image(content=content)
response = vision_client.text_detection(image=image)
texts = response.text_annotations
return texts[0].description
def read_ingredients() -> str:
vision_client = vision.ImageAnnotatorClient()
with io.open("/home/bajajnehaa/healthy_hints/images/Ingredients-list.jpg", 'rb') as image_file:
content = image_file.read()
image = vision.Image(content=content)
response = vision_client.text_detection(image=image)
texts = response.text_annotations
return texts[0].description