Spaces:
Running
Running
Fix makedir bug
Browse files
eval.py
CHANGED
@@ -101,8 +101,8 @@ def eval_files(
|
|
101 |
result_dictionary["bert_score"] = inference()
|
102 |
|
103 |
if output_path is not None:
|
104 |
-
if not os.path.exists(os.path.dirname(output_path)):
|
105 |
-
os.makedirs(os.path.dirname(output_path))
|
106 |
with open(output_path, "w") as f:
|
107 |
json.dump(result_dictionary, f, indent=4)
|
108 |
|
|
|
101 |
result_dictionary["bert_score"] = inference()
|
102 |
|
103 |
if output_path is not None:
|
104 |
+
if not os.path.exists(os.path.abspath(os.path.dirname(output_path))):
|
105 |
+
os.makedirs(os.path.abspath(os.path.dirname(output_path)))
|
106 |
with open(output_path, "w") as f:
|
107 |
json.dump(result_dictionary, f, indent=4)
|
108 |
|