freemt commited on
Commit
49e54f5
·
1 Parent(s): 4678308
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -23,7 +23,12 @@ def cmat2aset(
23
  np.ndarray, List[Tuple[Union[int, str], Union[int, str], Union[float, str]]]
24
  ]:
25
  """Set up gradio api for cmataset."""
26
- cmat = np.array(cmat, dtype=float)
 
 
 
 
 
27
  logger.debug("cmat[:3, :3]: %s", cmat[:3, :3])
28
  try:
29
  return c2a(cmat, eps, min_samples)
 
23
  np.ndarray, List[Tuple[Union[int, str], Union[int, str], Union[float, str]]]
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)