Bug fixes

This commit is contained in:
Senad Uka
2019-11-17 16:10:12 +01:00
parent a098711731
commit a7f360de82
3 changed files with 4 additions and 4 deletions

View File

@@ -31,8 +31,8 @@ def cars(photo_name):
instances = []
for label in response['Labels']:
if label['Name'] != 'Car':
continue
instances.append(label['Instances'])
if label['Name'] == 'Car':
for instance in label['Instances']:
instances.append(instance)
return (number_of_cars, instances)

View File

@@ -14,7 +14,7 @@ def analyze_picture():
file_extension = '.' + content['extension']
picture = content['picture_base64']
name = uploader.upload_file(picture, file_extension)
_, instances = analyzer.cars(name)
number , instances = analyzer.cars(name)
return jsonify(instances)
if __name__ == '__main__':