haixuantao
commited on
Commit
•
99b4821
1
Parent(s):
f30f59b
Adding data and adding a merge script
Browse files- graphs/dataflow.yml +0 -1
- graphs/merge.py +24 -3
- graphs/out/57926662-ef6c-4d33-b456-aa79b8c0fc60/audio.arrow +3 -0
- graphs/out/57926662-ef6c-4d33-b456-aa79b8c0fc60/mistral_output_file.arrow +3 -0
- graphs/out/57926662-ef6c-4d33-b456-aa79b8c0fc60/raw_file.arrow +3 -0
- graphs/out/57926662-ef6c-4d33-b456-aa79b8c0fc60/saved_file.arrow +3 -0
- graphs/out/57926662-ef6c-4d33-b456-aa79b8c0fc60/whisper_text.arrow +3 -0
graphs/dataflow.yml
CHANGED
@@ -159,4 +159,3 @@ nodes:
|
|
159 |
saved_file: file_saver/saved_file
|
160 |
audio: microphone/audio
|
161 |
whisper_text: whisper/text
|
162 |
-
image: webcam/image
|
|
|
159 |
saved_file: file_saver/saved_file
|
160 |
audio: microphone/audio
|
161 |
whisper_text: whisper/text
|
|
graphs/merge.py
CHANGED
@@ -1,9 +1,30 @@
|
|
1 |
import pyarrow as pa
|
2 |
|
3 |
-
with pa.memory_map(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
df_i = pa.RecordBatchStreamReader(source).read_all()
|
5 |
|
|
|
|
|
6 |
df_i = df_i.to_pandas()
|
7 |
-
df_b = df_b.to_pandas()
|
8 |
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import pyarrow as pa
|
2 |
|
3 |
+
with pa.memory_map(
|
4 |
+
"graphs/out/57926662-ef6c-4d33-b456-aa79b8c0fc60/whisper_text.arrow", "r"
|
5 |
+
) as source:
|
6 |
+
df_w = pa.RecordBatchStreamReader(source).read_all()
|
7 |
+
|
8 |
+
with pa.memory_map(
|
9 |
+
"graphs/out/57926662-ef6c-4d33-b456-aa79b8c0fc60/saved_file.arrow", "r"
|
10 |
+
) as source:
|
11 |
df_i = pa.RecordBatchStreamReader(source).read_all()
|
12 |
|
13 |
+
|
14 |
+
df_w = df_w.to_pandas()
|
15 |
df_i = df_i.to_pandas()
|
|
|
16 |
|
17 |
+
df_i["origin"] = df_i["saved_file"].map(lambda x: x[0]["origin"])
|
18 |
+
df_w["whisper_text"] = df_w["whisper_text"].map(lambda x: x[0])
|
19 |
+
|
20 |
+
df = df_i.merge(df_w, on="trace_id")
|
21 |
+
|
22 |
+
print(df)
|
23 |
+
|
24 |
+
print(df.columns)
|
25 |
+
|
26 |
+
|
27 |
+
print(df.groupby(by=["trace_id", "origin"]).count())
|
28 |
+
|
29 |
+
|
30 |
+
print(df.groupby(by=["whisper_text", "origin"]).count())
|
graphs/out/57926662-ef6c-4d33-b456-aa79b8c0fc60/audio.arrow
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6571bd2e8fc1ae7faf72257bb739f52fb449cf2b8a8b692a57f16e448ea65f93
|
3 |
+
size 932520
|
graphs/out/57926662-ef6c-4d33-b456-aa79b8c0fc60/mistral_output_file.arrow
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d16f4aa00b256660ecbed242c886cf3a8ac3e467e572ff64f53ddba3b7b5c78c
|
3 |
+
size 69168
|
graphs/out/57926662-ef6c-4d33-b456-aa79b8c0fc60/raw_file.arrow
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cd2fef581809843241311a7e7c5d4f0ca2d3d017375a75cc8ac03470da27eb22
|
3 |
+
size 61792
|
graphs/out/57926662-ef6c-4d33-b456-aa79b8c0fc60/saved_file.arrow
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8774d72eaa1346d76ebc95214e71849e3e6b4909ad7390b7592ce33169ca5f77
|
3 |
+
size 100928
|
graphs/out/57926662-ef6c-4d33-b456-aa79b8c0fc60/whisper_text.arrow
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ee94694b0bc8c2ab57f40bfbfe65ee752b461fc8f03c1563ed1c4af40903928d
|
3 |
+
size 9208
|