Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
lol
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyjbowers committed Sep 27, 2017
1 parent bfdc2c9 commit 60bf155
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test_wth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import os
import uuid

from face import Face
from image import Image as RecognitionImage
from rekognitionrecognizer import RekognitionRecognizer
from twilio_app import persist_file

media_url="https://pbs.twimg.com/profile_images/681152691461042177/_PrgDgFA.jpg"
target_image = RecognitionImage(image_url=media_url)
recognizer = RekognitionRecognizer(os.environ.get('FACIAL_RECOGNITION_ENDPOINT', None))
recognizer.recognize(target_image)
key_str = 'applications/faces/' + str(uuid.uuid4()) + '.png'
target_image.get_image_file().seek(0)
url = persist_file(key_str, target_image.get_image_file())
print(url)

0 comments on commit 60bf155

Please sign in to comment.