mrdbourke commited on
Commit
bb43d96
1 Parent(s): e3a963e

add food vision 199 script

Browse files
Files changed (1) hide show
  1. food_vision_199_classes.py +3 -1
food_vision_199_classes.py CHANGED
@@ -18,9 +18,11 @@ _CITATION = "TODO"
18
  _DESCRIPTION = "Images of 199 food classes from the Nutrify app."
19
 
20
  # Read lines of class_names.txt
21
- with open("class_names.txt", "r") as f:
 
22
  _NAMES = f.read().splitlines()
23
 
 
24
  class Food199(datasets.GeneratorBasedBuilder):
25
  """Food199 Images dataset"""
26
 
 
18
  _DESCRIPTION = "Images of 199 food classes from the Nutrify app."
19
 
20
  # Read lines of class_names.txt
21
+ class_names = datasets.DownloadManager().download("class_names.txt")
22
+ with open(class_names, "r") as f:
23
  _NAMES = f.read().splitlines()
24
 
25
+ # Create Food199 class
26
  class Food199(datasets.GeneratorBasedBuilder):
27
  """Food199 Images dataset"""
28