GranularFireplace commited on
Commit
80c00a1
·
verified ·
1 Parent(s): c1f7192
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -261,7 +261,7 @@ def predict_malware(img_array: np.ndarray) -> str:
261
  prediction = app.state.model.predict(img_array)
262
  return {
263
  "result": MAL_CLASSES[np.argmax(prediction)],
264
- "all_results": dict(zip(MAL_CLASSES, softmax(prediction)))
265
  }
266
  except Exception as e:
267
  logger.error(f"Prediction error: {str(e)}")
 
261
  prediction = app.state.model.predict(img_array)
262
  return {
263
  "result": MAL_CLASSES[np.argmax(prediction)],
264
+ "all_results": dict(zip(MAL_CLASSES, softmax(prediction).tolist()))
265
  }
266
  except Exception as e:
267
  logger.error(f"Prediction error: {str(e)}")