Skip to content

Instantly share code, notes, and snippets.

View jnhasty's full-sized avatar

Nick Hasty jnhasty

View GitHub Profile
@jnhasty
jnhasty / google-cv-ocr.py
Last active May 15, 2020 23:26
Class for getting GIF captions from Google Cloud Vision OCR endpoint
import io
import math
from difflib import SequenceMatcher
from google.oauth2 import service_account
from google.cloud import vision as GoogleVision
from google.cloud.vision import types as GoogleTypes
from PIL import Image, ImageSequence