Spaces:
Runtime error
Runtime error
freemt
commited on
Commit
·
3b3dc37
1
Parent(s):
ddc967b
Update logzero.level(10)
Browse files- app.py +9 -1
- poetry.lock +0 -0
- pyproject.toml +1 -0
app.py
CHANGED
@@ -3,19 +3,27 @@
|
|
3 |
from typing import List, Tuple, Union
|
4 |
|
5 |
import gradio as gr
|
|
|
6 |
import numpy as np
|
7 |
from cmat2aset import cmat2aset as c2a
|
|
|
8 |
from logzero import logger
|
9 |
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
def cmat2aset(
|
12 |
-
cmat: Union[np.ndarray, List[List]],
|
13 |
eps: float = 10,
|
14 |
min_samples: int = 6,
|
15 |
) -> Union[
|
16 |
np.ndarray, List[Tuple[Union[int, str], Union[int, str], Union[float, str]]]
|
17 |
]:
|
18 |
"""Set up gradio api for cmataset."""
|
|
|
19 |
try:
|
20 |
return c2a(cmat, eps, min_samples)
|
21 |
except Exception as exc:
|
|
|
3 |
from typing import List, Tuple, Union
|
4 |
|
5 |
import gradio as gr
|
6 |
+
import logzero
|
7 |
import numpy as np
|
8 |
from cmat2aset import cmat2aset as c2a
|
9 |
+
|
10 |
from logzero import logger
|
11 |
|
12 |
+
logzero.level(10)
|
13 |
+
logdebug("gradio version: %s", gr.__version__)
|
14 |
+
|
15 |
+
# 3.0.19
|
16 |
+
|
17 |
|
18 |
def cmat2aset(
|
19 |
+
cmat: Union[np.ndarray, List[List[float]]],
|
20 |
eps: float = 10,
|
21 |
min_samples: int = 6,
|
22 |
) -> Union[
|
23 |
np.ndarray, List[Tuple[Union[int, str], Union[int, str], Union[float, str]]]
|
24 |
]:
|
25 |
"""Set up gradio api for cmataset."""
|
26 |
+
logger.debug("cma[:3, :3]", np.array(cmat)[:3, :3])
|
27 |
try:
|
28 |
return c2a(cmat, eps, min_samples)
|
29 |
except Exception as exc:
|
poetry.lock
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
pyproject.toml
CHANGED
@@ -8,6 +8,7 @@ license = "MIT"
|
|
8 |
[tool.poetry.dependencies]
|
9 |
python = "^3.8.3"
|
10 |
cmat2aset = "^0.1.0-alpha.7"
|
|
|
11 |
|
12 |
[tool.poetry.dev-dependencies]
|
13 |
|
|
|
8 |
[tool.poetry.dependencies]
|
9 |
python = "^3.8.3"
|
10 |
cmat2aset = "^0.1.0-alpha.7"
|
11 |
+
gradio = "^3.0.19"
|
12 |
|
13 |
[tool.poetry.dev-dependencies]
|
14 |
|