Bug fixes
This commit is contained in:
Binary file not shown.
@@ -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)
|
||||
|
||||
@@ -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__':
|
||||
|
||||
Reference in New Issue
Block a user