mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 09:16:19 +00:00
[VISION] Safed vision processing, not mandatory
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user