MaHaWo commited on
Commit
3c310e8
·
1 Parent(s): 1582553

add flush to print statements

Browse files
birdnet_custom_v2.4/model.py CHANGED
@@ -105,7 +105,7 @@ class Model(ModelBase):
105
 
106
  # Get feature embeddings
107
  self.output_layer_index = output_details[0]["index"] - 1
108
- print("Default classifier loaded")
109
 
110
  # now load the custom classifier
111
  self.custom_classifier = tflite.Interpreter(
@@ -138,7 +138,7 @@ class Model(ModelBase):
138
  Returns:
139
  np.array: Feature embedding produces by the default birdnet CNN.
140
  """
141
- print(" get embeddings")
142
  self.model.resize_tensor_input(
143
  self.input_layer_index, [len(data), *data[0].shape]
144
  )
 
105
 
106
  # Get feature embeddings
107
  self.output_layer_index = output_details[0]["index"] - 1
108
+ print("Default classifier loaded", flush = True)
109
 
110
  # now load the custom classifier
111
  self.custom_classifier = tflite.Interpreter(
 
138
  Returns:
139
  np.array: Feature embedding produces by the default birdnet CNN.
140
  """
141
+ print(" get embeddings", flush = True))
142
  self.model.resize_tensor_input(
143
  self.input_layer_index, [len(data), *data[0].shape]
144
  )
birdnet_custom_v2.4/preprocessor.py CHANGED
@@ -43,7 +43,7 @@ class Preprocessor(ppb.PreprocessorBase):
43
  Returns:
44
  list: chunked audio data
45
  """
46
- print("process audio data custom")
47
  seconds = self.sample_secs
48
  minlen = 1.5
49
 
@@ -71,6 +71,7 @@ class Preprocessor(ppb.PreprocessorBase):
71
  "process audio data custom: complete, read ",
72
  str(len(self.chunks)),
73
  "chunks.",
 
74
  )
75
 
76
  return self.chunks
 
43
  Returns:
44
  list: chunked audio data
45
  """
46
+ print("process audio data custom", flush=True)
47
  seconds = self.sample_secs
48
  minlen = 1.5
49
 
 
71
  "process audio data custom: complete, read ",
72
  str(len(self.chunks)),
73
  "chunks.",
74
+ flush=True
75
  )
76
 
77
  return self.chunks
birdnet_default_v2.4/preprocessor.py CHANGED
@@ -43,7 +43,7 @@ class Preprocessor(ppb.PreprocessorBase):
43
  Returns:
44
  list: chunked audio data
45
  """
46
- print("process audio data default")
47
  seconds = self.sample_secs
48
  minlen = 1.5
49
 
@@ -70,8 +70,7 @@ class Preprocessor(ppb.PreprocessorBase):
70
  print(
71
  "process audio data default: complete, read ",
72
  str(len(self.chunks)),
73
- "chunks.",
74
- )
75
 
76
  return self.chunks
77
 
 
43
  Returns:
44
  list: chunked audio data
45
  """
46
+ print("process audio data default", flush=True)
47
  seconds = self.sample_secs
48
  minlen = 1.5
49
 
 
70
  print(
71
  "process audio data default: complete, read ",
72
  str(len(self.chunks)),
73
+ "chunks.",flush=True)
 
74
 
75
  return self.chunks
76
 
google_bird_classification/preprocessor.py CHANGED
@@ -45,7 +45,7 @@ class Preprocessor(ppb.PreprocessorBase):
45
  Returns:
46
  list: chunked audio data
47
  """
48
- print("process audio data custom ")
49
 
50
  self.chunks = []
51
 
@@ -66,6 +66,7 @@ class Preprocessor(ppb.PreprocessorBase):
66
  "process audio data google: complete, read ",
67
  str(len(self.chunks)),
68
  "chunks.",
 
69
  )
70
 
71
  return self.chunks
 
45
  Returns:
46
  list: chunked audio data
47
  """
48
+ print("process audio data custom", flush=True)
49
 
50
  self.chunks = []
51
 
 
66
  "process audio data google: complete, read ",
67
  str(len(self.chunks)),
68
  "chunks.",
69
+ flush=True
70
  )
71
 
72
  return self.chunks