asahi417 commited on
Commit
16749e8
·
1 Parent(s): 168ffb6
Files changed (1) hide show
  1. download_audio.py +2 -4
download_audio.py CHANGED
@@ -117,7 +117,7 @@ def get_audio(dataframe: pd.DataFrame):
117
  return True
118
 
119
 
120
- def process_dataset():
121
  df_metadata = get_metadata()
122
  print(f"metadata: {len(df_metadata)}, {line_no_start} --> {line_no_end}")
123
  inputs = [
@@ -146,6 +146,7 @@ def process_dataset():
146
  with open(feature) as f_reader:
147
  return json.load(f_reader)
148
 
 
149
  features = [loader(i) for i in glob(p_join(cache_dir_feature, '*.json'))]
150
  features = [i for i in features if line_no_start <= int(i["line_no"]) < line_no_end]
151
  print(f"push {len(features)} records to hub")
@@ -167,6 +168,3 @@ def process_dataset():
167
  time.sleep(60)
168
 
169
 
170
- if __name__ == '__main__':
171
- process_dataset()
172
-
 
117
  return True
118
 
119
 
120
+ if __name__ == '__main__':
121
  df_metadata = get_metadata()
122
  print(f"metadata: {len(df_metadata)}, {line_no_start} --> {line_no_end}")
123
  inputs = [
 
146
  with open(feature) as f_reader:
147
  return json.load(f_reader)
148
 
149
+
150
  features = [loader(i) for i in glob(p_join(cache_dir_feature, '*.json'))]
151
  features = [i for i in features if line_no_start <= int(i["line_no"]) < line_no_end]
152
  print(f"push {len(features)} records to hub")
 
168
  time.sleep(60)
169
 
170