arcan3 commited on
Commit
4dedd5b
·
1 Parent(s): 5374205

added new revs

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. funcs/processor.py +2 -2
app.py CHANGED
@@ -183,11 +183,11 @@ def get_som_mp4_v2(csv_file_box, slice_size_slider, sample_rate, window_size_sli
183
  print('finished processing')
184
  try:
185
  if json_file_box is None:
186
- return processed_file_box, json_file_box, slices_per_leg, plot_box_leg, plot_box_overlay, slice_slider, plot_slice_leg, get_all_slice, slice_json_box, None, None
187
  train_x, train_y = read_json_files(json_file_box)
188
  except:
189
  if json_file_box.name is None:
190
- return processed_file_box, json_file_box, slices_per_leg, plot_box_leg, plot_box_overlay, slice_slider, plot_slice_leg, get_all_slice, slice_json_box, None, None
191
  train_x, train_y = read_json_files(json_file_box.name)
192
 
193
  # Convert tensors to numpy arrays if necessary
 
183
  print('finished processing')
184
  try:
185
  if json_file_box is None:
186
+ return processed_file_box, json_file_box, slices_per_leg, plot_box_leg, plot_box_overlay, slice_slider, plot_slice_leg, get_all_slice, slice_json_box, None, None, None
187
  train_x, train_y = read_json_files(json_file_box)
188
  except:
189
  if json_file_box.name is None:
190
+ return processed_file_box, json_file_box, slices_per_leg, plot_box_leg, plot_box_overlay, slice_slider, plot_slice_leg, get_all_slice, slice_json_box, None, None, None
191
  train_x, train_y = read_json_files(json_file_box.name)
192
 
193
  # Convert tensors to numpy arrays if necessary
funcs/processor.py CHANGED
@@ -9,11 +9,11 @@ def process_data(input_file, slice_size=64, sample_rate=20, window_size=40, min_
9
  # Read the data from the file, including the CRC column
10
  try:
11
  if input_file.name is None:
12
- return None, None, None, None, None, None, None, None, None
13
  data = pd.read_csv(input_file.name, delimiter=";", index_col="NR", usecols=["NR", "TS", "LEG", "GX", "GY", "GZ", "AX", "AY", "AZ", "CRC"])
14
  except:
15
  if input_file is None:
16
- return None, None, None, None, None, None, None, None, None
17
  data = pd.read_csv(input_file, delimiter=";", index_col="NR", usecols=["NR", "TS", "LEG", "GX", "GY", "GZ", "AX", "AY", "AZ", "CRC"])
18
 
19
  # Replace the values with NaN when the CRC value is not zero
 
9
  # Read the data from the file, including the CRC column
10
  try:
11
  if input_file.name is None:
12
+ return None, None, None, None, None, None, None, None, None, None
13
  data = pd.read_csv(input_file.name, delimiter=";", index_col="NR", usecols=["NR", "TS", "LEG", "GX", "GY", "GZ", "AX", "AY", "AZ", "CRC"])
14
  except:
15
  if input_file is None:
16
+ return None, None, None, None, None, None, None, None, None, None
17
  data = pd.read_csv(input_file, delimiter=";", index_col="NR", usecols=["NR", "TS", "LEG", "GX", "GY", "GZ", "AX", "AY", "AZ", "CRC"])
18
 
19
  # Replace the values with NaN when the CRC value is not zero