freemt commited on
Commit
7e6c0d6
·
1 Parent(s): 49e54f5
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -24,11 +24,13 @@ def cmat2aset(
24
  ]:
25
  """Set up gradio api for cmataset."""
26
  try:
 
 
27
  cmat = np.array(cmat, dtype=float)
28
  except Exception as exc:
29
- logger.error(exc)
30
- return np.array([str(exc)])
31
-
32
  logger.debug("cmat[:3, :3]: %s", cmat[:3, :3])
33
  try:
34
  return c2a(cmat, eps, min_samples)
 
24
  ]:
25
  """Set up gradio api for cmataset."""
26
  try:
27
+ # cmat[cmat==""] = 0
28
+ cmat = np.where(cmat == "", cmat) # type: ignore
29
  cmat = np.array(cmat, dtype=float)
30
  except Exception as exc:
31
+ logger.exception(exc)
32
+ return np.array([[str(exc)]])
33
+
34
  logger.debug("cmat[:3, :3]: %s", cmat[:3, :3])
35
  try:
36
  return c2a(cmat, eps, min_samples)