omri374 commited on
Commit
a9d5309
·
1 Parent(s): 0b0dc50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -135,13 +135,13 @@ else:
135
 
136
 
137
  # json result
138
- class ToDictEncoder(JSONEncoder):
139
  """Encode dict to json."""
140
 
141
  def default(self, o):
142
  """Encode to JSON using to_dict."""
143
- return o.to_dict()
144
 
145
 
146
  if st_return_decision_process:
147
- st.json(json.dumps(st_analyze_results, cls=ToDictEncoder))
 
135
 
136
 
137
  # json result
138
+ class ToDictListEncoder(JSONEncoder):
139
  """Encode dict to json."""
140
 
141
  def default(self, o):
142
  """Encode to JSON using to_dict."""
143
+ return [res.to_dict() for res in o]
144
 
145
 
146
  if st_return_decision_process:
147
+ st.json(json.dumps(st_analyze_results, cls=ToDictListEncoder))