初始化项目,由ModelHub XC社区提供模型
Model: Weyaxi/Einstein-v4-7B Source: Original Platform
This commit is contained in:
13
data/remove_empty_output.py
Normal file
13
data/remove_empty_output.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import json
|
||||
|
||||
with open('merged_all.json', 'r') as file:
|
||||
data = json.load(file)
|
||||
|
||||
print(f"Normal len: {len(data)}")
|
||||
|
||||
data = [row for row in data if row["output"] != ""]
|
||||
|
||||
print(f"After len: {len(data)}")
|
||||
|
||||
with open('merged_all.json', 'w') as file:
|
||||
json.dump(data, file, indent=1)
|
||||
Reference in New Issue
Block a user