mylesai commited on
Commit
fa637cb
·
verified ·
1 Parent(s): 74b0ecb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -38,7 +38,7 @@ def get_topical_map(path):
38
  def get_imgs_from_folder(image_files, zipfile):
39
 
40
  # image file types
41
- IMAGE_TYPES = ['jpg','jpeg','gif','bmp','png', 'jpe']
42
  # file types
43
  FILE_TYPES = ['jpg','jpeg','gif','bmp','png', 'jpe', 'zip', 'mp4']
44
 
@@ -448,13 +448,13 @@ def get_collection_dict():
448
  'Authorization': os.environ['BRANDFOLDER_API_KEY']
449
  }
450
 
451
- r = requests.get('https://brandfolder.com/api/v4/brandfolders/988cgqcg8xsrr5g9h7gtsqkg/collections', params={
452
  # use a dict with your desired URL parameters here
453
  }, headers=headers)
454
 
455
  temp = r.json()['data']
456
 
457
- collection_dict = {item['attributes']['name']:item['id'] for item in temp}
458
 
459
  return collection_dict
460
 
 
38
  def get_imgs_from_folder(image_files, zipfile):
39
 
40
  # image file types
41
+ IMAGE_TYPES = ['jpg','jpeg','gif','bmp','png', 'jpe', 'heic']
42
  # file types
43
  FILE_TYPES = ['jpg','jpeg','gif','bmp','png', 'jpe', 'zip', 'mp4']
44
 
 
448
  'Authorization': os.environ['BRANDFOLDER_API_KEY']
449
  }
450
 
451
+ r = requests.get('https://brandfolder.com/api/v4/brandfolders/988cgqcg8xsrr5g9h7gtsqkg/collections?per=200', params={
452
  # use a dict with your desired URL parameters here
453
  }, headers=headers)
454
 
455
  temp = r.json()['data']
456
 
457
+ collection_dict = dict(sorted({item['attributes']['name']:item['id'] for item in temp}.items()))
458
 
459
  return collection_dict
460