Fix gradio numpy.int serialization error

This commit is contained in:
litagin02
2024-05-30 19:04:28 +09:00
parent 393d594621
commit db3e28cd47

View File

@@ -136,7 +136,7 @@ def do_dbscan_gradio(eps=2.5, min_samples=15):
) )
plt.legend() plt.legend()
n_clusters = max(y_pred) + 1 n_clusters = int(max(y_pred) + 1)
if n_clusters > MAX_CLUSTER_NUM: if n_clusters > MAX_CLUSTER_NUM:
# raise ValueError(f"The number of clusters is too large: {n_clusters}") # raise ValueError(f"The number of clusters is too large: {n_clusters}")