[VISION] Safed vision processing, not mandatory

This commit is contained in:
Alexis LEBEL
2023-04-01 10:17:51 +02:00
parent 350ef0d212
commit 8cc99181c3

View File

@@ -15,9 +15,7 @@ except:
async def process(attachment):
if not os.path.exists("./../database/google-vision"):
debug("Google Vision API is not setup, please run /setup")
return
try:
debug("Processing image...")
image = vision.Image()
image.source.image_uri = attachment.url
@@ -64,3 +62,6 @@ async def process(attachment):
f.close()
return final
except Exception as e:
debug("Error while processing image: " + str(e))