mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 01:06:19 +00:00
[VISION] Safed vision processing, not mandatory
This commit is contained in:
@@ -15,9 +15,7 @@ except:
|
|||||||
|
|
||||||
|
|
||||||
async def process(attachment):
|
async def process(attachment):
|
||||||
if not os.path.exists("./../database/google-vision"):
|
try:
|
||||||
debug("Google Vision API is not setup, please run /setup")
|
|
||||||
return
|
|
||||||
debug("Processing image...")
|
debug("Processing image...")
|
||||||
image = vision.Image()
|
image = vision.Image()
|
||||||
image.source.image_uri = attachment.url
|
image.source.image_uri = attachment.url
|
||||||
@@ -64,3 +62,6 @@ async def process(attachment):
|
|||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
return final
|
return final
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
debug("Error while processing image: " + str(e))
|
||||||
|
|||||||
Reference in New Issue
Block a user