From 9556bdbc0fc5aa6dac69116e3c89450f0daa4a2e Mon Sep 17 00:00:00 2001 From: Martin <maarand@teklia.com> Date: Tue, 31 Mar 2020 15:27:15 +0200 Subject: [PATCH] fix formatting --- kaldi_data_generator.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/kaldi_data_generator.py b/kaldi_data_generator.py index 7271768..dbe0a73 100644 --- a/kaldi_data_generator.py +++ b/kaldi_data_generator.py @@ -10,11 +10,10 @@ from io import BytesIO from pathlib import Path from typing import Tuple -import tqdm - import cv2 import numpy as np import requests +import tqdm from PIL import Image from apistar.exceptions import ErrorResponse from arkindex import ArkindexClient, options_from_env @@ -47,8 +46,8 @@ def download_image(url): # Preprocess the image and prepare it for classification image = Image.open(BytesIO(resp.content)) logger.debug('Downloaded image {} - size={}x{}'.format(url, - image.size[0], - image.size[1])) + image.size[0], + image.size[1])) return image @@ -117,7 +116,7 @@ class KaldiDataGenerator: full_image_url = res['zone']['image']['s3_url'] if full_image_url is None: - full_image_url = res['zone']['image']['url'] + '/full/full/0/default.jpg' + full_image_url = res['zone']['image']['url'] + '/full/full/0/default.jpg' img = self.get_image(full_image_url, page_id=page_id) -- GitLab