def test_photo_to_song(self): image_urls = [ "https://oxfordportal.blob.core.windows.net/vision/Thumbnail/1.jpg", "https://oxfordportal.blob.core.windows.net/vision/Thumbnail/4.jpg" ] result = p2s.convert(image_urls) self.assertTrue("mood" in result) print(result)
def post(self): image_urls = self.get_image_urls() result = {} try: result = p2s.convert(image_urls) except Exception as ex: print(ex) self.write(result)