from google.cloud import vision

# Create a client
client = vision.ImageAnnotatorClient()

# Load image
with open("canvas.png", "rb") as image_file:
    content = image_file.read()
    image = vision.Image(content=content)

# Perform text detection
response = client.text_detection(image=image)
texts = response.text_annotations

print("Detected text:")
for text in texts:
    print(text)
