Ellie5757575757 commited on
Commit
de8b0e2
·
verified ·
1 Parent(s): e1e69e9

Update output.py

Browse files
Files changed (1) hide show
  1. output.py +2 -2
output.py CHANGED
@@ -7,7 +7,7 @@ Aphasia classification inference (cleaned).
7
  - Adds predict_from_chajson(json_path, ...) helper
8
  """
9
 
10
- import json as _json
11
  import os
12
  import math
13
  from dataclasses import dataclass
@@ -598,7 +598,7 @@ def predict_from_chajson(model_dir: str, chajson_path: str, output_file: Optiona
598
  def format_result(pred: dict, style: str = "json") -> str:
599
  """Back-compat formatter. 'pred' is the dict returned by predict_*."""
600
  if style == "json":
601
- return _json.dumps(pred, ensure_ascii=False, indent=2)
602
  # simple text summary
603
  if isinstance(pred, dict) and "summary" in pred:
604
  s = pred["summary"]
 
7
  - Adds predict_from_chajson(json_path, ...) helper
8
  """
9
 
10
+ import json as json
11
  import os
12
  import math
13
  from dataclasses import dataclass
 
598
  def format_result(pred: dict, style: str = "json") -> str:
599
  """Back-compat formatter. 'pred' is the dict returned by predict_*."""
600
  if style == "json":
601
+ return json.dumps(pred, ensure_ascii=False, indent=2)
602
  # simple text summary
603
  if isinstance(pred, dict) and "summary" in pred:
604
  s = pred["summary"]