Commit
·
5ae57bc
1
Parent(s):
71cdd8a
Add new file
Browse files
script.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pandas as pd
|
2 |
+
from datasets import load_dataset
|
3 |
+
import numpy as np
|
4 |
+
import tqdm.auto as tqdm
|
5 |
+
dataset_remote = load_dataset("/tmp/data",split = "test",streaming = True)
|
6 |
+
out = []
|
7 |
+
for el in tqdm.tqdm(dataset_remote):
|
8 |
+
print(el["id"], len(el["audio"]["bytes"]))
|
9 |
+
out.append(dict(id = el["id"], pred = np.random.choice(["generated","pristine"])))
|
10 |
+
|
11 |
+
pd.DataFrame(out).to_csv("submission.csv",index = False)
|