molher commited on
Commit
84823eb
·
1 Parent(s): c508465

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -10
app.py CHANGED
@@ -30,17 +30,23 @@ model.eval()
30
  print("MTCNN & Classfier models loaded")
31
 
32
 
33
- EXAMPLES_FOLDER = 'examples'
34
- examples_names = os.listdir(EXAMPLES_FOLDER)
35
- examples = []
36
- for example_name in examples_names:
37
- example_path = os.path.join(EXAMPLES_FOLDER, example_name)
38
- label = example_name.split('_')[0]
39
- example = {
40
- 'path': example_path,
41
- 'label': label
 
 
 
 
 
 
42
  }
43
- examples.append(example)
44
 
45
 
46
 
 
30
  print("MTCNN & Classfier models loaded")
31
 
32
 
33
+ # Abrimos el fichero pickle de ejemplos de imagenes
34
+
35
+ with open('examples.pkl','rb) as file:
36
+
37
+ examples=pickle(file)
38
+
39
+ #EXAMPLES_FOLDER = 'examples'
40
+ #examples_names = os.listdir(EXAMPLES_FOLDER)
41
+ #examples = []
42
+ #for example_name in examples_names:
43
+ # example_path = os.path.join(EXAMPLES_FOLDER, example_name)
44
+ # label = example_name.split('_')[0]
45
+ # example = {
46
+ # 'path': example_path,
47
+ # 'label': label
48
  }
49
+ # examples.append(example)
50
 
51
 
52