benchang1110 commited on
Commit
2f7d940
1 Parent(s): 795644b

initial commit

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. QA.json +3 -0
  3. convert.py +20 -0
.gitattributes CHANGED
@@ -53,3 +53,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
 
 
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
56
+ QA.json filter=lfs diff=lfs merge=lfs -text
QA.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:418b4025af33a4a73849347bd82eefb9f444e299962baf44d70387d1e40e56d4
3
+ size 104135998
convert.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import json
3
+
4
+ data = []
5
+ df = pd.read_csv('QA.csv')
6
+
7
+
8
+ for index, row in df.iterrows():
9
+ for column in df.columns:
10
+ # print(f"{column}: {row[column]}")
11
+ # remove the white space
12
+ if isinstance(row[column], str):
13
+ row[column] = row[column].replace(' ','').replace(' ','')
14
+ data.append(row.to_dict())
15
+
16
+ with open('QA.json', 'w') as f:
17
+ json.dump(data, f, ensure_ascii=False, indent=4)
18
+
19
+ print("Done")
20
+