ziem-io commited on
Commit
4c56373
·
1 Parent(s): 4acb8ae

Update: Reorder JSON object

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -150,10 +150,6 @@ def predict(review: str):
150
  html_out = build_svg_with_values(prediction_flavours_list)
151
 
152
  json_out = {
153
- "review": review,
154
- "model": FILENAME,
155
- "device": device,
156
- "duration": round((t_end_flavours - t_start_flavours), 3),
157
  "results": [{
158
  #'icon': ICONS[name],
159
  "name": name,
@@ -162,6 +158,10 @@ def predict(review: str):
162
  }
163
  for name, score in prediction_flavours.items()
164
  ],
 
 
 
 
165
  }
166
 
167
  return html_out, json_out
 
150
  html_out = build_svg_with_values(prediction_flavours_list)
151
 
152
  json_out = {
 
 
 
 
153
  "results": [{
154
  #'icon': ICONS[name],
155
  "name": name,
 
158
  }
159
  for name, score in prediction_flavours.items()
160
  ],
161
+ "review": review,
162
+ "model": FILENAME,
163
+ "device": device,
164
+ "duration": round((t_end_flavours - t_start_flavours), 3),
165
  }
166
 
167
  return html_out, json_out