Spaces:
Runtime error
Runtime error
freemt
commited on
Commit
·
747c2ab
1
Parent(s):
f2dd44e
Fix gr.interface removed load
Browse files- app.py +22 -4
- gradio_cmat/gradio_cmat.py +5 -4
- install.sh +5 -0
- okteto.yml +1 -1
- poetry.lock +99 -99
- pyproject.toml +3 -2
app.py
CHANGED
@@ -2,30 +2,48 @@
|
|
2 |
# pylint: disable=invalid-name
|
3 |
import numpy as np
|
4 |
import gradio as gr
|
5 |
-
from
|
|
|
6 |
from logzero import logger
|
|
|
7 |
|
8 |
from gradio_cmat import gradio_cmat
|
9 |
|
10 |
-
|
|
|
11 |
|
12 |
|
13 |
def fn(text1: str, text2: str) -> np.ndarray:
|
14 |
"""Define."""
|
15 |
list1 = [elm.strip() for elm in text1.splitlines() if elm.strip()]
|
16 |
list2 = [elm.strip() for elm in text2.splitlines() if elm.strip()]
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
try:
|
18 |
res = gradio_cmat(list1, list2)
|
|
|
19 |
except Exception as e:
|
20 |
logger.error("gradio_cmat error: %s", e)
|
21 |
raise
|
22 |
|
23 |
return res
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
# _ = """
|
27 |
try:
|
28 |
-
interface = gr.Interface
|
29 |
fn,
|
30 |
[
|
31 |
gr.inputs.Textbox(
|
@@ -33,7 +51,7 @@ try:
|
|
33 |
),
|
34 |
gr.inputs.Textbox(lines=3, default="The fast brown fox jumps over lazy dogs."),
|
35 |
],
|
36 |
-
|
37 |
description="Gen corralation matrix",
|
38 |
)
|
39 |
except Exception as e:
|
|
|
2 |
# pylint: disable=invalid-name
|
3 |
import numpy as np
|
4 |
import gradio as gr
|
5 |
+
from hf_model_s import model_s
|
6 |
+
import logzero
|
7 |
from logzero import logger
|
8 |
+
from set_loglevel import set_loglevel
|
9 |
|
10 |
from gradio_cmat import gradio_cmat
|
11 |
|
12 |
+
logzero.loglevel(set_loglevel())
|
13 |
+
model = model_s()
|
14 |
|
15 |
|
16 |
def fn(text1: str, text2: str) -> np.ndarray:
|
17 |
"""Define."""
|
18 |
list1 = [elm.strip() for elm in text1.splitlines() if elm.strip()]
|
19 |
list2 = [elm.strip() for elm in text2.splitlines() if elm.strip()]
|
20 |
+
|
21 |
+
logger.debug("text1[:10]: %s", text1[:10])
|
22 |
+
logger.debug("text2[:10]: %s", text2[:10])
|
23 |
+
logger.info("info text1[:10]: %s", text1[:10])
|
24 |
+
logger.info("info text2[:10]: %s", text2[:10])
|
25 |
+
|
26 |
try:
|
27 |
res = gradio_cmat(list1, list2)
|
28 |
+
logger.info("res: %s, %s", res. res.shape)
|
29 |
except Exception as e:
|
30 |
logger.error("gradio_cmat error: %s", e)
|
31 |
raise
|
32 |
|
33 |
return res
|
34 |
|
35 |
+
out_df = gr.outputs.Dataframe(
|
36 |
+
headers=None,
|
37 |
+
max_rows=50, # 20
|
38 |
+
max_cols=None,
|
39 |
+
overflow_row_behaviour="paginate",
|
40 |
+
type="auto",
|
41 |
+
label="cmat",
|
42 |
+
)
|
43 |
|
44 |
# _ = """
|
45 |
try:
|
46 |
+
interface = gr.Interface(
|
47 |
fn,
|
48 |
[
|
49 |
gr.inputs.Textbox(
|
|
|
51 |
),
|
52 |
gr.inputs.Textbox(lines=3, default="The fast brown fox jumps over lazy dogs."),
|
53 |
],
|
54 |
+
out_df,
|
55 |
description="Gen corralation matrix",
|
56 |
)
|
57 |
except Exception as e:
|
gradio_cmat/gradio_cmat.py
CHANGED
@@ -4,9 +4,10 @@ from typing import List, Optional
|
|
4 |
|
5 |
import numpy as np
|
6 |
from logzero import logger
|
7 |
-
from model_pool import load_model_s
|
|
|
8 |
|
9 |
-
|
10 |
|
11 |
|
12 |
def gradio_cmat(
|
@@ -27,13 +28,13 @@ def gradio_cmat(
|
|
27 |
list2 = list2_[:]
|
28 |
|
29 |
try:
|
30 |
-
vec1 =
|
31 |
except Exception as e:
|
32 |
logger.error("mode_s.encode(list1) error: %s", e)
|
33 |
raise
|
34 |
|
35 |
try:
|
36 |
-
vec2 =
|
37 |
except Exception as e:
|
38 |
logger.error("mode_s.encode(list2) error: %s", e)
|
39 |
raise
|
|
|
4 |
|
5 |
import numpy as np
|
6 |
from logzero import logger
|
7 |
+
# from model_pool import load_model_s
|
8 |
+
from hf_model_s import model_s
|
9 |
|
10 |
+
model = model_s()
|
11 |
|
12 |
|
13 |
def gradio_cmat(
|
|
|
28 |
list2 = list2_[:]
|
29 |
|
30 |
try:
|
31 |
+
vec1 = model.encode(list1)
|
32 |
except Exception as e:
|
33 |
logger.error("mode_s.encode(list1) error: %s", e)
|
34 |
raise
|
35 |
|
36 |
try:
|
37 |
+
vec2 = model.encode(list2)
|
38 |
except Exception as e:
|
39 |
logger.error("mode_s.encode(list2) error: %s", e)
|
40 |
raise
|
install.sh
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
pip install pipx
|
2 |
+
pipx install poetry
|
3 |
+
pipx ensurepath
|
4 |
+
source ~/.bashrc
|
5 |
+
~/.local/bin/poetry install
|
okteto.yml
CHANGED
@@ -36,7 +36,7 @@ dev:
|
|
36 |
environment:
|
37 |
- name=$USER
|
38 |
forward:
|
39 |
-
-
|
40 |
reverse:
|
41 |
- 9000:9000
|
42 |
autocreate: true
|
|
|
36 |
environment:
|
37 |
- name=$USER
|
38 |
forward:
|
39 |
+
- 8880:80
|
40 |
reverse:
|
41 |
- 9000:9000
|
42 |
autocreate: true
|
poetry.lock
CHANGED
@@ -95,20 +95,6 @@ python-versions = ">=3.7"
|
|
95 |
[package.extras]
|
96 |
tests = ["pytest", "pytest-asyncio", "mypy (>=0.800)"]
|
97 |
|
98 |
-
[[package]]
|
99 |
-
name = "asttokens"
|
100 |
-
version = "2.0.5"
|
101 |
-
description = "Annotate AST trees with source code positions"
|
102 |
-
category = "main"
|
103 |
-
optional = false
|
104 |
-
python-versions = "*"
|
105 |
-
|
106 |
-
[package.dependencies]
|
107 |
-
six = "*"
|
108 |
-
|
109 |
-
[package.extras]
|
110 |
-
test = ["astroid", "pytest"]
|
111 |
-
|
112 |
[[package]]
|
113 |
name = "async-timeout"
|
114 |
version = "4.0.2"
|
@@ -239,12 +225,22 @@ optional = false
|
|
239 |
python-versions = ">=3.6"
|
240 |
|
241 |
[[package]]
|
242 |
-
name = "
|
243 |
-
version = "
|
244 |
-
description = "
|
245 |
category = "main"
|
246 |
optional = false
|
247 |
-
python-versions = "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
|
249 |
[[package]]
|
250 |
name = "fastapi"
|
@@ -360,13 +356,28 @@ category = "main"
|
|
360 |
optional = false
|
361 |
python-versions = ">=3.6"
|
362 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
[[package]]
|
364 |
name = "huggingface-hub"
|
365 |
-
version = "0.
|
366 |
description = "Client library to download and publish models on the huggingface.co hub"
|
367 |
category = "main"
|
368 |
optional = false
|
369 |
-
python-versions = ">=3.
|
370 |
|
371 |
[package.dependencies]
|
372 |
filelock = "*"
|
@@ -377,26 +388,12 @@ tqdm = "*"
|
|
377 |
typing-extensions = ">=3.7.4.3"
|
378 |
|
379 |
[package.extras]
|
380 |
-
|
381 |
-
|
|
|
|
|
|
|
382 |
torch = ["torch"]
|
383 |
-
all = ["pytest", "datasets", "black (>=20.8b1)", "isort (>=5.5.4)", "flake8 (>=3.8.3)"]
|
384 |
-
dev = ["pytest", "datasets", "black (>=20.8b1)", "isort (>=5.5.4)", "flake8 (>=3.8.3)"]
|
385 |
-
quality = ["black (>=20.8b1)", "isort (>=5.5.4)", "flake8 (>=3.8.3)"]
|
386 |
-
|
387 |
-
[[package]]
|
388 |
-
name = "icecream"
|
389 |
-
version = "2.1.2"
|
390 |
-
description = "Never use print() to debug again; inspect variables, expressions, and program execution with a single, simple function call."
|
391 |
-
category = "main"
|
392 |
-
optional = false
|
393 |
-
python-versions = "*"
|
394 |
-
|
395 |
-
[package.dependencies]
|
396 |
-
asttokens = ">=2.0.1"
|
397 |
-
colorama = ">=0.3.9"
|
398 |
-
executing = ">=0.3.1"
|
399 |
-
pygments = ">=2.2.0"
|
400 |
|
401 |
[[package]]
|
402 |
name = "idna"
|
@@ -414,14 +411,6 @@ category = "dev"
|
|
414 |
optional = false
|
415 |
python-versions = "*"
|
416 |
|
417 |
-
[[package]]
|
418 |
-
name = "install"
|
419 |
-
version = "1.3.5"
|
420 |
-
description = "Install packages from within code"
|
421 |
-
category = "main"
|
422 |
-
optional = false
|
423 |
-
python-versions = ">=2.7, >=3.5"
|
424 |
-
|
425 |
[[package]]
|
426 |
name = "jinja2"
|
427 |
version = "3.1.2"
|
@@ -511,6 +500,23 @@ category = "main"
|
|
511 |
optional = false
|
512 |
python-versions = ">=3.7"
|
513 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
514 |
[[package]]
|
515 |
name = "matplotlib"
|
516 |
version = "3.5.2"
|
@@ -554,23 +560,6 @@ category = "main"
|
|
554 |
optional = false
|
555 |
python-versions = ">=3.7"
|
556 |
|
557 |
-
[[package]]
|
558 |
-
name = "model-pool"
|
559 |
-
version = "0.1.3"
|
560 |
-
description = "pack_name descr "
|
561 |
-
category = "main"
|
562 |
-
optional = false
|
563 |
-
python-versions = ">=3.7.9,<4.0.0"
|
564 |
-
|
565 |
-
[package.dependencies]
|
566 |
-
alive-progress = ">=2.3.1,<3.0.0"
|
567 |
-
huggingface-hub = ">=0.4.0,<0.5.0"
|
568 |
-
icecream = ">=2.1.1,<3.0.0"
|
569 |
-
install = ">=1.3.5,<2.0.0"
|
570 |
-
joblib = ">=1.1.0,<2.0.0"
|
571 |
-
logzero = ">=1.7.0,<2.0.0"
|
572 |
-
sentence-transformers = ">=2.2.0,<3.0.0"
|
573 |
-
|
574 |
[[package]]
|
575 |
name = "monotonic"
|
576 |
version = "1.6"
|
@@ -748,14 +737,6 @@ category = "main"
|
|
748 |
optional = false
|
749 |
python-versions = "*"
|
750 |
|
751 |
-
[[package]]
|
752 |
-
name = "pygments"
|
753 |
-
version = "2.12.0"
|
754 |
-
description = "Pygments is a syntax highlighting package written in Python."
|
755 |
-
category = "main"
|
756 |
-
optional = false
|
757 |
-
python-versions = ">=3.6"
|
758 |
-
|
759 |
[[package]]
|
760 |
name = "pynacl"
|
761 |
version = "1.5.0"
|
@@ -814,6 +795,17 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
|
|
814 |
[package.dependencies]
|
815 |
six = ">=1.5"
|
816 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
817 |
[[package]]
|
818 |
name = "python-multipart"
|
819 |
version = "0.0.5"
|
@@ -941,6 +933,18 @@ category = "main"
|
|
941 |
optional = false
|
942 |
python-versions = "*"
|
943 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
944 |
[[package]]
|
945 |
name = "setuptools-scm"
|
946 |
version = "6.4.2"
|
@@ -1183,8 +1187,8 @@ multidict = ">=4.0"
|
|
1183 |
|
1184 |
[metadata]
|
1185 |
lock-version = "1.1"
|
1186 |
-
python-versions = "^3.8"
|
1187 |
-
content-hash = "
|
1188 |
|
1189 |
[metadata.files]
|
1190 |
about-time = [
|
@@ -1285,10 +1289,6 @@ asgiref = [
|
|
1285 |
{file = "asgiref-3.5.1-py3-none-any.whl", hash = "sha256:45a429524fba18aba9d512498b19d220c4d628e75b40cf5c627524dbaebc5cc1"},
|
1286 |
{file = "asgiref-3.5.1.tar.gz", hash = "sha256:fddeea3c53fa99d0cdb613c3941cc6e52d822491fc2753fba25768fb5bf4e865"},
|
1287 |
]
|
1288 |
-
asttokens = [
|
1289 |
-
{file = "asttokens-2.0.5-py2.py3-none-any.whl", hash = "sha256:0844691e88552595a6f4a4281a9f7f79b8dd45ca4ccea82e5e05b4bbdb76705c"},
|
1290 |
-
{file = "asttokens-2.0.5.tar.gz", hash = "sha256:9a54c114f02c7a9480d56550932546a3f1fe71d8a02f1bc7ccd0ee3ee35cf4d5"},
|
1291 |
-
]
|
1292 |
async-timeout = [
|
1293 |
{file = "async-timeout-4.0.2.tar.gz", hash = "sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15"},
|
1294 |
{file = "async_timeout-4.0.2-py3-none-any.whl", hash = "sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c"},
|
@@ -1414,9 +1414,9 @@ cycler = [
|
|
1414 |
{file = "cycler-0.11.0-py3-none-any.whl", hash = "sha256:3a27e95f763a428a739d2add979fa7494c912a32c17c4c38c4d5f082cad165a3"},
|
1415 |
{file = "cycler-0.11.0.tar.gz", hash = "sha256:9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f"},
|
1416 |
]
|
1417 |
-
|
1418 |
-
{file = "
|
1419 |
-
{file = "
|
1420 |
]
|
1421 |
fastapi = [
|
1422 |
{file = "fastapi-0.75.2-py3-none-any.whl", hash = "sha256:a70d31f4249b6b42dbe267667d22f83af645b2d857876c97f83ca9573215784f"},
|
@@ -1505,13 +1505,13 @@ h11 = [
|
|
1505 |
{file = "h11-0.13.0-py3-none-any.whl", hash = "sha256:8ddd78563b633ca55346c8cd41ec0af27d3c79931828beffb46ce70a379e7442"},
|
1506 |
{file = "h11-0.13.0.tar.gz", hash = "sha256:70813c1135087a248a4d38cc0e1a0181ffab2188141a93eaf567940c3957ff06"},
|
1507 |
]
|
1508 |
-
|
1509 |
-
{file = "
|
1510 |
-
{file = "
|
1511 |
]
|
1512 |
-
|
1513 |
-
{file = "
|
1514 |
-
{file = "
|
1515 |
]
|
1516 |
idna = [
|
1517 |
{file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"},
|
@@ -1521,10 +1521,6 @@ iniconfig = [
|
|
1521 |
{file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
|
1522 |
{file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
|
1523 |
]
|
1524 |
-
install = [
|
1525 |
-
{file = "install-1.3.5-py3-none-any.whl", hash = "sha256:0d3fadf4aa62c95efe8d34757c8507eb46177f86c016c21c6551eafc6a53d5a9"},
|
1526 |
-
{file = "install-1.3.5.tar.gz", hash = "sha256:e67c8a0be5ccf8cb4ffa17d090f3a61b6e820e6a7e21cd1d2c0f7bc59b18e647"},
|
1527 |
-
]
|
1528 |
jinja2 = [
|
1529 |
{file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"},
|
1530 |
{file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"},
|
@@ -1632,6 +1628,10 @@ markupsafe = [
|
|
1632 |
{file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"},
|
1633 |
{file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"},
|
1634 |
]
|
|
|
|
|
|
|
|
|
1635 |
matplotlib = [
|
1636 |
{file = "matplotlib-3.5.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:03bbb3f5f78836855e127b5dab228d99551ad0642918ccbf3067fcd52ac7ac5e"},
|
1637 |
{file = "matplotlib-3.5.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:49a5938ed6ef9dda560f26ea930a2baae11ea99e1c2080c8714341ecfda72a89"},
|
@@ -1677,10 +1677,6 @@ mdurl = [
|
|
1677 |
{file = "mdurl-0.1.1-py3-none-any.whl", hash = "sha256:6a8f6804087b7128040b2fb2ebe242bdc2affaeaa034d5fc9feeed30b443651b"},
|
1678 |
{file = "mdurl-0.1.1.tar.gz", hash = "sha256:f79c9709944df218a4cdb0fcc0b0c7ead2f44594e3e84dc566606f04ad749c20"},
|
1679 |
]
|
1680 |
-
model-pool = [
|
1681 |
-
{file = "model_pool-0.1.3-py3-none-any.whl", hash = "sha256:827846b6f44821ccdf668a9e90c0b5bda08728fb7f1df4f67e9934ed279e9310"},
|
1682 |
-
{file = "model_pool-0.1.3.tar.gz", hash = "sha256:7a61c283d15433714ff9091e33cc8ac6eff29671cede0b4dbc9f333944214189"},
|
1683 |
-
]
|
1684 |
monotonic = [
|
1685 |
{file = "monotonic-1.6-py2.py3-none-any.whl", hash = "sha256:68687e19a14f11f26d140dd5c86f3dba4bf5df58003000ed467e0e2a69bca96c"},
|
1686 |
{file = "monotonic-1.6.tar.gz", hash = "sha256:3a55207bcfed53ddd5c5bae174524062935efed17792e9de2ad0205ce9ad63f7"},
|
@@ -1962,10 +1958,6 @@ pydub = [
|
|
1962 |
{file = "pydub-0.25.1-py2.py3-none-any.whl", hash = "sha256:65617e33033874b59d87db603aa1ed450633288aefead953b30bded59cb599a6"},
|
1963 |
{file = "pydub-0.25.1.tar.gz", hash = "sha256:980a33ce9949cab2a569606b65674d748ecbca4f0796887fd6f46173a7b0d30f"},
|
1964 |
]
|
1965 |
-
pygments = [
|
1966 |
-
{file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"},
|
1967 |
-
{file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"},
|
1968 |
-
]
|
1969 |
pynacl = [
|
1970 |
{file = "PyNaCl-1.5.0-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:401002a4aaa07c9414132aaed7f6836ff98f59277a234704ff66878c2ee4a0d1"},
|
1971 |
{file = "PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:52cb72a79269189d4e0dc537556f4740f7f0a9ec41c1322598799b0bdad4ef92"},
|
@@ -1990,6 +1982,10 @@ python-dateutil = [
|
|
1990 |
{file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"},
|
1991 |
{file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"},
|
1992 |
]
|
|
|
|
|
|
|
|
|
1993 |
python-multipart = [
|
1994 |
{file = "python-multipart-0.0.5.tar.gz", hash = "sha256:f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43"},
|
1995 |
]
|
@@ -2219,6 +2215,10 @@ sentencepiece = [
|
|
2219 |
{file = "sentencepiece-0.1.96-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48c6d13b3bfff08060c138248e85df60f6fad11135ad7a8fc2ef6005aacca839"},
|
2220 |
{file = "sentencepiece-0.1.96.tar.gz", hash = "sha256:9bdf097d5bd1d8ce42dfee51f6ff05f5578b96e48c6f6006aa4eff69edfa3639"},
|
2221 |
]
|
|
|
|
|
|
|
|
|
2222 |
setuptools-scm = [
|
2223 |
{file = "setuptools_scm-6.4.2-py3-none-any.whl", hash = "sha256:acea13255093849de7ccb11af9e1fb8bde7067783450cee9ef7a93139bddf6d4"},
|
2224 |
{file = "setuptools_scm-6.4.2.tar.gz", hash = "sha256:6833ac65c6ed9711a4d5d2266f8024cfa07c533a0e55f4c12f6eff280a5a9e30"},
|
|
|
95 |
[package.extras]
|
96 |
tests = ["pytest", "pytest-asyncio", "mypy (>=0.800)"]
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
[[package]]
|
99 |
name = "async-timeout"
|
100 |
version = "4.0.2"
|
|
|
225 |
python-versions = ">=3.6"
|
226 |
|
227 |
[[package]]
|
228 |
+
name = "environs"
|
229 |
+
version = "9.5.0"
|
230 |
+
description = "simplified environment variable parsing"
|
231 |
category = "main"
|
232 |
optional = false
|
233 |
+
python-versions = ">=3.6"
|
234 |
+
|
235 |
+
[package.dependencies]
|
236 |
+
marshmallow = ">=3.0.0"
|
237 |
+
python-dotenv = "*"
|
238 |
+
|
239 |
+
[package.extras]
|
240 |
+
dev = ["pytest", "dj-database-url", "dj-email-url", "django-cache-url", "flake8 (==4.0.1)", "flake8-bugbear (==21.9.2)", "mypy (==0.910)", "pre-commit (>=2.4,<3.0)", "tox"]
|
241 |
+
django = ["dj-database-url", "dj-email-url", "django-cache-url"]
|
242 |
+
lint = ["flake8 (==4.0.1)", "flake8-bugbear (==21.9.2)", "mypy (==0.910)", "pre-commit (>=2.4,<3.0)"]
|
243 |
+
tests = ["pytest", "dj-database-url", "dj-email-url", "django-cache-url"]
|
244 |
|
245 |
[[package]]
|
246 |
name = "fastapi"
|
|
|
356 |
optional = false
|
357 |
python-versions = ">=3.6"
|
358 |
|
359 |
+
[[package]]
|
360 |
+
name = "hf-model-s"
|
361 |
+
version = "0.1.0"
|
362 |
+
description = "model-s served from hf spaces"
|
363 |
+
category = "main"
|
364 |
+
optional = false
|
365 |
+
python-versions = ">=3.8.3,<4.0.0"
|
366 |
+
|
367 |
+
[package.dependencies]
|
368 |
+
alive-progress = ">=2.4.1,<3.0.0"
|
369 |
+
huggingface-hub = ">=0.5.1,<0.6.0"
|
370 |
+
joblib = ">=1.1.0,<2.0.0"
|
371 |
+
logzero = ">=1.7.0,<2.0.0"
|
372 |
+
sentence-transformers = ">=2.2.0,<3.0.0"
|
373 |
+
|
374 |
[[package]]
|
375 |
name = "huggingface-hub"
|
376 |
+
version = "0.5.1"
|
377 |
description = "Client library to download and publish models on the huggingface.co hub"
|
378 |
category = "main"
|
379 |
optional = false
|
380 |
+
python-versions = ">=3.7.0"
|
381 |
|
382 |
[package.dependencies]
|
383 |
filelock = "*"
|
|
|
388 |
typing-extensions = ">=3.7.4.3"
|
389 |
|
390 |
[package.extras]
|
391 |
+
all = ["pytest", "datasets", "soundfile", "black (>=22.0,<23.0)", "isort (>=5.5.4)", "flake8 (>=3.8.3)"]
|
392 |
+
dev = ["pytest", "datasets", "soundfile", "black (>=22.0,<23.0)", "isort (>=5.5.4)", "flake8 (>=3.8.3)"]
|
393 |
+
quality = ["black (>=22.0,<23.0)", "isort (>=5.5.4)", "flake8 (>=3.8.3)"]
|
394 |
+
tensorflow = ["tensorflow", "pydot", "graphviz"]
|
395 |
+
testing = ["pytest", "datasets", "soundfile"]
|
396 |
torch = ["torch"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
|
398 |
[[package]]
|
399 |
name = "idna"
|
|
|
411 |
optional = false
|
412 |
python-versions = "*"
|
413 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
[[package]]
|
415 |
name = "jinja2"
|
416 |
version = "3.1.2"
|
|
|
500 |
optional = false
|
501 |
python-versions = ">=3.7"
|
502 |
|
503 |
+
[[package]]
|
504 |
+
name = "marshmallow"
|
505 |
+
version = "3.15.0"
|
506 |
+
description = "A lightweight library for converting complex datatypes to and from native Python datatypes."
|
507 |
+
category = "main"
|
508 |
+
optional = false
|
509 |
+
python-versions = ">=3.7"
|
510 |
+
|
511 |
+
[package.dependencies]
|
512 |
+
packaging = "*"
|
513 |
+
|
514 |
+
[package.extras]
|
515 |
+
dev = ["pytest", "pytz", "simplejson", "mypy (==0.940)", "flake8 (==4.0.1)", "flake8-bugbear (==22.1.11)", "pre-commit (>=2.4,<3.0)", "tox"]
|
516 |
+
docs = ["sphinx (==4.4.0)", "sphinx-issues (==3.0.1)", "alabaster (==0.7.12)", "sphinx-version-warning (==1.1.2)", "autodocsumm (==0.2.7)"]
|
517 |
+
lint = ["mypy (==0.940)", "flake8 (==4.0.1)", "flake8-bugbear (==22.1.11)", "pre-commit (>=2.4,<3.0)"]
|
518 |
+
tests = ["pytest", "pytz", "simplejson"]
|
519 |
+
|
520 |
[[package]]
|
521 |
name = "matplotlib"
|
522 |
version = "3.5.2"
|
|
|
560 |
optional = false
|
561 |
python-versions = ">=3.7"
|
562 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
563 |
[[package]]
|
564 |
name = "monotonic"
|
565 |
version = "1.6"
|
|
|
737 |
optional = false
|
738 |
python-versions = "*"
|
739 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
740 |
[[package]]
|
741 |
name = "pynacl"
|
742 |
version = "1.5.0"
|
|
|
795 |
[package.dependencies]
|
796 |
six = ">=1.5"
|
797 |
|
798 |
+
[[package]]
|
799 |
+
name = "python-dotenv"
|
800 |
+
version = "0.20.0"
|
801 |
+
description = "Read key-value pairs from a .env file and set them as environment variables"
|
802 |
+
category = "main"
|
803 |
+
optional = false
|
804 |
+
python-versions = ">=3.5"
|
805 |
+
|
806 |
+
[package.extras]
|
807 |
+
cli = ["click (>=5.0)"]
|
808 |
+
|
809 |
[[package]]
|
810 |
name = "python-multipart"
|
811 |
version = "0.0.5"
|
|
|
933 |
optional = false
|
934 |
python-versions = "*"
|
935 |
|
936 |
+
[[package]]
|
937 |
+
name = "set-loglevel"
|
938 |
+
version = "0.1.1"
|
939 |
+
description = "Return a loglevel (10, 20, etc.) taking ENV LOGLEVEL into account"
|
940 |
+
category = "main"
|
941 |
+
optional = false
|
942 |
+
python-versions = ">=3.8.3,<4.0.0"
|
943 |
+
|
944 |
+
[package.dependencies]
|
945 |
+
environs = ">=9.5.0,<10.0.0"
|
946 |
+
logzero = ">=1.7.0,<2.0.0"
|
947 |
+
|
948 |
[[package]]
|
949 |
name = "setuptools-scm"
|
950 |
version = "6.4.2"
|
|
|
1187 |
|
1188 |
[metadata]
|
1189 |
lock-version = "1.1"
|
1190 |
+
python-versions = "^3.8.3"
|
1191 |
+
content-hash = "e2a661bab628f8031150195d0cb746932a5c4142595f06f3e20157b24382ecb4"
|
1192 |
|
1193 |
[metadata.files]
|
1194 |
about-time = [
|
|
|
1289 |
{file = "asgiref-3.5.1-py3-none-any.whl", hash = "sha256:45a429524fba18aba9d512498b19d220c4d628e75b40cf5c627524dbaebc5cc1"},
|
1290 |
{file = "asgiref-3.5.1.tar.gz", hash = "sha256:fddeea3c53fa99d0cdb613c3941cc6e52d822491fc2753fba25768fb5bf4e865"},
|
1291 |
]
|
|
|
|
|
|
|
|
|
1292 |
async-timeout = [
|
1293 |
{file = "async-timeout-4.0.2.tar.gz", hash = "sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15"},
|
1294 |
{file = "async_timeout-4.0.2-py3-none-any.whl", hash = "sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c"},
|
|
|
1414 |
{file = "cycler-0.11.0-py3-none-any.whl", hash = "sha256:3a27e95f763a428a739d2add979fa7494c912a32c17c4c38c4d5f082cad165a3"},
|
1415 |
{file = "cycler-0.11.0.tar.gz", hash = "sha256:9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f"},
|
1416 |
]
|
1417 |
+
environs = [
|
1418 |
+
{file = "environs-9.5.0-py2.py3-none-any.whl", hash = "sha256:1e549569a3de49c05f856f40bce86979e7d5ffbbc4398e7f338574c220189124"},
|
1419 |
+
{file = "environs-9.5.0.tar.gz", hash = "sha256:a76307b36fbe856bdca7ee9161e6c466fd7fcffc297109a118c59b54e27e30c9"},
|
1420 |
]
|
1421 |
fastapi = [
|
1422 |
{file = "fastapi-0.75.2-py3-none-any.whl", hash = "sha256:a70d31f4249b6b42dbe267667d22f83af645b2d857876c97f83ca9573215784f"},
|
|
|
1505 |
{file = "h11-0.13.0-py3-none-any.whl", hash = "sha256:8ddd78563b633ca55346c8cd41ec0af27d3c79931828beffb46ce70a379e7442"},
|
1506 |
{file = "h11-0.13.0.tar.gz", hash = "sha256:70813c1135087a248a4d38cc0e1a0181ffab2188141a93eaf567940c3957ff06"},
|
1507 |
]
|
1508 |
+
hf-model-s = [
|
1509 |
+
{file = "hf-model-s-0.1.0.tar.gz", hash = "sha256:e33ca7b806eceab82b3ef82fb4de78ce666bf1682783e0b5633f3d2cff33cabb"},
|
1510 |
+
{file = "hf_model_s-0.1.0-py3-none-any.whl", hash = "sha256:279d5c0afc13b77aa4a8aca55552577a8a168305ab3ac95605e7dc002106744e"},
|
1511 |
]
|
1512 |
+
huggingface-hub = [
|
1513 |
+
{file = "huggingface_hub-0.5.1-py3-none-any.whl", hash = "sha256:b9fd1f567a3fb16e73acc613e78d075d1926d4b0c5c56ba08c4f125707b50c70"},
|
1514 |
+
{file = "huggingface_hub-0.5.1.tar.gz", hash = "sha256:d90d657dca0d6a577f640ff684a58da8e5c76258e485100e885a0e7307e2eb12"},
|
1515 |
]
|
1516 |
idna = [
|
1517 |
{file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"},
|
|
|
1521 |
{file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
|
1522 |
{file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
|
1523 |
]
|
|
|
|
|
|
|
|
|
1524 |
jinja2 = [
|
1525 |
{file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"},
|
1526 |
{file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"},
|
|
|
1628 |
{file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"},
|
1629 |
{file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"},
|
1630 |
]
|
1631 |
+
marshmallow = [
|
1632 |
+
{file = "marshmallow-3.15.0-py3-none-any.whl", hash = "sha256:ff79885ed43b579782f48c251d262e062bce49c65c52412458769a4fb57ac30f"},
|
1633 |
+
{file = "marshmallow-3.15.0.tar.gz", hash = "sha256:2aaaab4f01ef4f5a011a21319af9fce17ab13bf28a026d1252adab0e035648d5"},
|
1634 |
+
]
|
1635 |
matplotlib = [
|
1636 |
{file = "matplotlib-3.5.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:03bbb3f5f78836855e127b5dab228d99551ad0642918ccbf3067fcd52ac7ac5e"},
|
1637 |
{file = "matplotlib-3.5.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:49a5938ed6ef9dda560f26ea930a2baae11ea99e1c2080c8714341ecfda72a89"},
|
|
|
1677 |
{file = "mdurl-0.1.1-py3-none-any.whl", hash = "sha256:6a8f6804087b7128040b2fb2ebe242bdc2affaeaa034d5fc9feeed30b443651b"},
|
1678 |
{file = "mdurl-0.1.1.tar.gz", hash = "sha256:f79c9709944df218a4cdb0fcc0b0c7ead2f44594e3e84dc566606f04ad749c20"},
|
1679 |
]
|
|
|
|
|
|
|
|
|
1680 |
monotonic = [
|
1681 |
{file = "monotonic-1.6-py2.py3-none-any.whl", hash = "sha256:68687e19a14f11f26d140dd5c86f3dba4bf5df58003000ed467e0e2a69bca96c"},
|
1682 |
{file = "monotonic-1.6.tar.gz", hash = "sha256:3a55207bcfed53ddd5c5bae174524062935efed17792e9de2ad0205ce9ad63f7"},
|
|
|
1958 |
{file = "pydub-0.25.1-py2.py3-none-any.whl", hash = "sha256:65617e33033874b59d87db603aa1ed450633288aefead953b30bded59cb599a6"},
|
1959 |
{file = "pydub-0.25.1.tar.gz", hash = "sha256:980a33ce9949cab2a569606b65674d748ecbca4f0796887fd6f46173a7b0d30f"},
|
1960 |
]
|
|
|
|
|
|
|
|
|
1961 |
pynacl = [
|
1962 |
{file = "PyNaCl-1.5.0-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:401002a4aaa07c9414132aaed7f6836ff98f59277a234704ff66878c2ee4a0d1"},
|
1963 |
{file = "PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:52cb72a79269189d4e0dc537556f4740f7f0a9ec41c1322598799b0bdad4ef92"},
|
|
|
1982 |
{file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"},
|
1983 |
{file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"},
|
1984 |
]
|
1985 |
+
python-dotenv = [
|
1986 |
+
{file = "python-dotenv-0.20.0.tar.gz", hash = "sha256:b7e3b04a59693c42c36f9ab1cc2acc46fa5df8c78e178fc33a8d4cd05c8d498f"},
|
1987 |
+
{file = "python_dotenv-0.20.0-py3-none-any.whl", hash = "sha256:d92a187be61fe482e4fd675b6d52200e7be63a12b724abbf931a40ce4fa92938"},
|
1988 |
+
]
|
1989 |
python-multipart = [
|
1990 |
{file = "python-multipart-0.0.5.tar.gz", hash = "sha256:f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43"},
|
1991 |
]
|
|
|
2215 |
{file = "sentencepiece-0.1.96-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48c6d13b3bfff08060c138248e85df60f6fad11135ad7a8fc2ef6005aacca839"},
|
2216 |
{file = "sentencepiece-0.1.96.tar.gz", hash = "sha256:9bdf097d5bd1d8ce42dfee51f6ff05f5578b96e48c6f6006aa4eff69edfa3639"},
|
2217 |
]
|
2218 |
+
set-loglevel = [
|
2219 |
+
{file = "set_loglevel-0.1.1-py3-none-any.whl", hash = "sha256:019e7cbb7ff1cb0eddd6f30e99f4514d964db140cb469b6d8d8a519134680527"},
|
2220 |
+
{file = "set_loglevel-0.1.1.tar.gz", hash = "sha256:18149080b6a4d4ae74f29408ee61d3b8fcd174eff78f49f4660509c3ad36d3d4"},
|
2221 |
+
]
|
2222 |
setuptools-scm = [
|
2223 |
{file = "setuptools_scm-6.4.2-py3-none-any.whl", hash = "sha256:acea13255093849de7ccb11af9e1fb8bde7067783450cee9ef7a93139bddf6d4"},
|
2224 |
{file = "setuptools_scm-6.4.2.tar.gz", hash = "sha256:6833ac65c6ed9711a4d5d2266f8024cfa07c533a0e55f4c12f6eff280a5a9e30"},
|
pyproject.toml
CHANGED
@@ -6,10 +6,11 @@ authors = ["mikeee"]
|
|
6 |
license = "MIT"
|
7 |
|
8 |
[tool.poetry.dependencies]
|
9 |
-
python = "^3.8"
|
10 |
logzero = "^1.7.0"
|
11 |
-
model-pool = "^0.1.3"
|
12 |
gradio = "^2.9.4"
|
|
|
|
|
13 |
|
14 |
[tool.poetry.dev-dependencies]
|
15 |
pytest = "^7.1.2"
|
|
|
6 |
license = "MIT"
|
7 |
|
8 |
[tool.poetry.dependencies]
|
9 |
+
python = "^3.8.3"
|
10 |
logzero = "^1.7.0"
|
|
|
11 |
gradio = "^2.9.4"
|
12 |
+
set-loglevel = "^0.1.1"
|
13 |
+
hf-model-s = "^0.1.0"
|
14 |
|
15 |
[tool.poetry.dev-dependencies]
|
16 |
pytest = "^7.1.2"
|