YAMITEK commited on
Commit
ce4f1c5
·
verified ·
1 Parent(s): 03a212c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -17
app.py CHANGED
@@ -134,23 +134,23 @@ def load_data():
134
 
135
  imgs = y_test["Path"].values
136
  labels = y_test["ClassId"].values
137
-
138
- test_images = []
139
- for img in imgs:
140
- if isinstance(img,str):
141
- image = Image.open('traffic_lights/Test/'+img)
142
- image = image.resize([30, 30])
143
- test_images.append(np.array(image))
144
-
145
- # Load meta images
146
- meta_images = {}
147
- meta_folder = 'traffic_lights/Meta' # Replace with the path to your meta folder
148
- for class_id in range(43):
149
- meta_image_path = os.path.join(meta_folder, f"{class_id}.png") # Assuming meta images are named as 0.png, 1.png, etc.
150
- if os.path.exists(meta_image_path):
151
- meta_images[class_id] = Image.open(meta_image_path)
152
-
153
- return test_images, labels, meta_images
154
 
155
  def main():
156
  colored_title("Traffic Symbol Prediction", "black")
 
134
 
135
  imgs = y_test["Path"].values
136
  labels = y_test["ClassId"].values
137
+ st.write(imgs)
138
+ # test_images = []
139
+ # for img in imgs:
140
+ # if isinstance(img,str):
141
+ # image = Image.open('traffic_lights/'+img)
142
+ # image = image.resize([30, 30])
143
+ # test_images.append(np.array(image))
144
+
145
+ # # Load meta images
146
+ # meta_images = {}
147
+ # meta_folder = 'traffic_lights/Meta' # Replace with the path to your meta folder
148
+ # for class_id in range(43):
149
+ # meta_image_path = os.path.join(meta_folder, f"{class_id}.png") # Assuming meta images are named as 0.png, 1.png, etc.
150
+ # if os.path.exists(meta_image_path):
151
+ # meta_images[class_id] = Image.open(meta_image_path)
152
+
153
+ # return test_images, labels, meta_images
154
 
155
  def main():
156
  colored_title("Traffic Symbol Prediction", "black")