Spaces:
Runtime error
Runtime error
cchanges in upload
Browse files
=4.2.1
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Requirement already satisfied: gradio in ./shark_venv3.0/lib/python3.9/site-packages (4.31.5)
|
2 |
+
Requirement already satisfied: aiofiles<24.0,>=22.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (23.1.0)
|
3 |
+
Requirement already satisfied: pandas<3.0,>=1.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (2.0.0)
|
4 |
+
Requirement already satisfied: pyyaml<7.0,>=5.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (6.0)
|
5 |
+
Requirement already satisfied: ffmpy in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.3.0)
|
6 |
+
Requirement already satisfied: python-multipart>=0.0.9 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.0.9)
|
7 |
+
Requirement already satisfied: tomlkit==0.12.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.12.0)
|
8 |
+
Requirement already satisfied: fastapi in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.111.0)
|
9 |
+
Requirement already satisfied: gradio-client==0.16.4 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.16.4)
|
10 |
+
Requirement already satisfied: ruff>=0.2.2 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.4.5)
|
11 |
+
Requirement already satisfied: pydantic>=2.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (2.7.1)
|
12 |
+
Requirement already satisfied: markupsafe~=2.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (2.1.2)
|
13 |
+
Requirement already satisfied: pillow<11.0,>=8.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (9.5.0)
|
14 |
+
Requirement already satisfied: jinja2<4.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (3.1.2)
|
15 |
+
Requirement already satisfied: packaging in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (23.1)
|
16 |
+
Requirement already satisfied: pydub in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.25.1)
|
17 |
+
Requirement already satisfied: huggingface-hub>=0.19.3 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.23.2)
|
18 |
+
Requirement already satisfied: typer<1.0,>=0.12 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.12.3)
|
19 |
+
Requirement already satisfied: httpx>=0.24.1 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.27.0)
|
20 |
+
Requirement already satisfied: importlib-resources<7.0,>=1.3 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (5.12.0)
|
21 |
+
Requirement already satisfied: altair<6.0,>=4.2.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (4.2.2)
|
22 |
+
Requirement already satisfied: typing-extensions~=4.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (4.12.0)
|
23 |
+
Requirement already satisfied: matplotlib~=3.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (3.7.1)
|
24 |
+
Requirement already satisfied: uvicorn>=0.14.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.21.1)
|
25 |
+
Requirement already satisfied: urllib3~=2.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (2.2.1)
|
26 |
+
Requirement already satisfied: numpy~=1.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (1.24.3)
|
27 |
+
Requirement already satisfied: orjson~=3.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (3.8.10)
|
28 |
+
Requirement already satisfied: semantic-version~=2.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (2.10.0)
|
29 |
+
Requirement already satisfied: fsspec in ./shark_venv3.0/lib/python3.9/site-packages (from gradio-client==0.16.4->gradio) (2024.5.0)
|
30 |
+
Requirement already satisfied: websockets<12.0,>=10.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio-client==0.16.4->gradio) (11.0.2)
|
31 |
+
Requirement already satisfied: entrypoints in ./shark_venv3.0/lib/python3.9/site-packages (from altair<6.0,>=4.2.0->gradio) (0.4)
|
32 |
+
Requirement already satisfied: toolz in ./shark_venv3.0/lib/python3.9/site-packages (from altair<6.0,>=4.2.0->gradio) (0.12.0)
|
33 |
+
Requirement already satisfied: jsonschema>=3.0 in ./shark_venv3.0/lib/python3.9/site-packages (from altair<6.0,>=4.2.0->gradio) (4.17.3)
|
34 |
+
Requirement already satisfied: httpcore==1.* in ./shark_venv3.0/lib/python3.9/site-packages (from httpx>=0.24.1->gradio) (1.0.5)
|
35 |
+
Requirement already satisfied: anyio in ./shark_venv3.0/lib/python3.9/site-packages (from httpx>=0.24.1->gradio) (3.6.2)
|
36 |
+
Requirement already satisfied: idna in ./shark_venv3.0/lib/python3.9/site-packages (from httpx>=0.24.1->gradio) (3.4)
|
37 |
+
Requirement already satisfied: certifi in ./shark_venv3.0/lib/python3.9/site-packages (from httpx>=0.24.1->gradio) (2022.12.7)
|
38 |
+
Requirement already satisfied: sniffio in ./shark_venv3.0/lib/python3.9/site-packages (from httpx>=0.24.1->gradio) (1.3.0)
|
39 |
+
Requirement already satisfied: h11<0.15,>=0.13 in ./shark_venv3.0/lib/python3.9/site-packages (from httpcore==1.*->httpx>=0.24.1->gradio) (0.14.0)
|
40 |
+
Requirement already satisfied: filelock in ./shark_venv3.0/lib/python3.9/site-packages (from huggingface-hub>=0.19.3->gradio) (3.12.0)
|
41 |
+
Requirement already satisfied: requests in ./shark_venv3.0/lib/python3.9/site-packages (from huggingface-hub>=0.19.3->gradio) (2.32.2)
|
42 |
+
Requirement already satisfied: tqdm>=4.42.1 in ./shark_venv3.0/lib/python3.9/site-packages (from huggingface-hub>=0.19.3->gradio) (4.65.0)
|
43 |
+
Requirement already satisfied: zipp>=3.1.0 in ./shark_venv3.0/lib/python3.9/site-packages (from importlib-resources<7.0,>=1.3->gradio) (3.15.0)
|
44 |
+
Requirement already satisfied: attrs>=17.4.0 in ./shark_venv3.0/lib/python3.9/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (23.1.0)
|
45 |
+
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in ./shark_venv3.0/lib/python3.9/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.19.3)
|
46 |
+
Requirement already satisfied: python-dateutil>=2.7 in ./shark_venv3.0/lib/python3.9/site-packages (from matplotlib~=3.0->gradio) (2.8.2)
|
47 |
+
Requirement already satisfied: fonttools>=4.22.0 in ./shark_venv3.0/lib/python3.9/site-packages (from matplotlib~=3.0->gradio) (4.39.3)
|
48 |
+
Requirement already satisfied: pyparsing>=2.3.1 in ./shark_venv3.0/lib/python3.9/site-packages (from matplotlib~=3.0->gradio) (3.0.9)
|
49 |
+
Requirement already satisfied: kiwisolver>=1.0.1 in ./shark_venv3.0/lib/python3.9/site-packages (from matplotlib~=3.0->gradio) (1.4.4)
|
50 |
+
Requirement already satisfied: cycler>=0.10 in ./shark_venv3.0/lib/python3.9/site-packages (from matplotlib~=3.0->gradio) (0.11.0)
|
51 |
+
Requirement already satisfied: contourpy>=1.0.1 in ./shark_venv3.0/lib/python3.9/site-packages (from matplotlib~=3.0->gradio) (1.0.7)
|
52 |
+
Requirement already satisfied: tzdata>=2022.1 in ./shark_venv3.0/lib/python3.9/site-packages (from pandas<3.0,>=1.0->gradio) (2023.3)
|
53 |
+
Requirement already satisfied: pytz>=2020.1 in ./shark_venv3.0/lib/python3.9/site-packages (from pandas<3.0,>=1.0->gradio) (2023.3)
|
54 |
+
Requirement already satisfied: annotated-types>=0.4.0 in ./shark_venv3.0/lib/python3.9/site-packages (from pydantic>=2.0->gradio) (0.7.0)
|
55 |
+
Requirement already satisfied: pydantic-core==2.18.2 in ./shark_venv3.0/lib/python3.9/site-packages (from pydantic>=2.0->gradio) (2.18.2)
|
56 |
+
Requirement already satisfied: six>=1.5 in ./shark_venv3.0/lib/python3.9/site-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio) (1.16.0)
|
57 |
+
Requirement already satisfied: click>=8.0.0 in ./shark_venv3.0/lib/python3.9/site-packages (from typer<1.0,>=0.12->gradio) (8.1.3)
|
58 |
+
Requirement already satisfied: rich>=10.11.0 in ./shark_venv3.0/lib/python3.9/site-packages (from typer<1.0,>=0.12->gradio) (13.3.4)
|
59 |
+
Requirement already satisfied: shellingham>=1.3.0 in ./shark_venv3.0/lib/python3.9/site-packages (from typer<1.0,>=0.12->gradio) (1.5.4)
|
60 |
+
Requirement already satisfied: markdown-it-py<3.0.0,>=2.2.0 in ./shark_venv3.0/lib/python3.9/site-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.2.0)
|
61 |
+
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in ./shark_venv3.0/lib/python3.9/site-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.15.1)
|
62 |
+
Requirement already satisfied: mdurl~=0.1 in ./shark_venv3.0/lib/python3.9/site-packages (from markdown-it-py<3.0.0,>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio) (0.1.2)
|
63 |
+
Requirement already satisfied: email_validator>=2.0.0 in ./shark_venv3.0/lib/python3.9/site-packages (from fastapi->gradio) (2.1.1)
|
64 |
+
Requirement already satisfied: fastapi-cli>=0.0.2 in ./shark_venv3.0/lib/python3.9/site-packages (from fastapi->gradio) (0.0.4)
|
65 |
+
Requirement already satisfied: ujson!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,>=4.0.1 in ./shark_venv3.0/lib/python3.9/site-packages (from fastapi->gradio) (5.10.0)
|
66 |
+
Requirement already satisfied: starlette<0.38.0,>=0.37.2 in ./shark_venv3.0/lib/python3.9/site-packages (from fastapi->gradio) (0.37.2)
|
67 |
+
Requirement already satisfied: dnspython>=2.0.0 in ./shark_venv3.0/lib/python3.9/site-packages (from email_validator>=2.0.0->fastapi->gradio) (2.6.1)
|
68 |
+
Requirement already satisfied: python-dotenv>=0.13 in ./shark_venv3.0/lib/python3.9/site-packages (from uvicorn>=0.14.0->gradio) (1.0.0)
|
69 |
+
Requirement already satisfied: httptools>=0.5.0 in ./shark_venv3.0/lib/python3.9/site-packages (from uvicorn>=0.14.0->gradio) (0.6.1)
|
70 |
+
Requirement already satisfied: watchfiles>=0.13 in ./shark_venv3.0/lib/python3.9/site-packages (from uvicorn>=0.14.0->gradio) (0.22.0)
|
71 |
+
Requirement already satisfied: uvloop!=0.15.0,!=0.15.1,>=0.14.0 in ./shark_venv3.0/lib/python3.9/site-packages (from uvicorn>=0.14.0->gradio) (0.19.0)
|
72 |
+
Requirement already satisfied: charset-normalizer<4,>=2 in ./shark_venv3.0/lib/python3.9/site-packages (from requests->huggingface-hub>=0.19.3->gradio) (3.1.0)
|
=4.2.2
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Requirement already satisfied: gradio in ./shark_venv3.0/lib/python3.9/site-packages (4.31.5)
|
2 |
+
Requirement already satisfied: matplotlib~=3.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (3.7.1)
|
3 |
+
Requirement already satisfied: numpy~=1.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (1.24.3)
|
4 |
+
Requirement already satisfied: uvicorn>=0.14.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.21.1)
|
5 |
+
Requirement already satisfied: altair<6.0,>=4.2.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (4.2.2)
|
6 |
+
Requirement already satisfied: python-multipart>=0.0.9 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.0.9)
|
7 |
+
Requirement already satisfied: urllib3~=2.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (2.2.1)
|
8 |
+
Requirement already satisfied: pandas<3.0,>=1.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (2.0.0)
|
9 |
+
Requirement already satisfied: aiofiles<24.0,>=22.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (23.1.0)
|
10 |
+
Requirement already satisfied: fastapi in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.111.0)
|
11 |
+
Requirement already satisfied: semantic-version~=2.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (2.10.0)
|
12 |
+
Requirement already satisfied: typing-extensions~=4.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (4.12.0)
|
13 |
+
Requirement already satisfied: pydub in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.25.1)
|
14 |
+
Requirement already satisfied: gradio-client==0.16.4 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.16.4)
|
15 |
+
Requirement already satisfied: pyyaml<7.0,>=5.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (6.0)
|
16 |
+
Requirement already satisfied: pillow<11.0,>=8.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (9.5.0)
|
17 |
+
Requirement already satisfied: ruff>=0.2.2 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.4.5)
|
18 |
+
Requirement already satisfied: typer<1.0,>=0.12 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.12.3)
|
19 |
+
Requirement already satisfied: tomlkit==0.12.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.12.0)
|
20 |
+
Requirement already satisfied: ffmpy in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.3.0)
|
21 |
+
Requirement already satisfied: importlib-resources<7.0,>=1.3 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (5.12.0)
|
22 |
+
Requirement already satisfied: markupsafe~=2.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (2.1.2)
|
23 |
+
Requirement already satisfied: jinja2<4.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (3.1.2)
|
24 |
+
Requirement already satisfied: httpx>=0.24.1 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.27.0)
|
25 |
+
Requirement already satisfied: pydantic>=2.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (2.7.1)
|
26 |
+
Requirement already satisfied: huggingface-hub>=0.19.3 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (0.23.2)
|
27 |
+
Requirement already satisfied: orjson~=3.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (3.8.10)
|
28 |
+
Requirement already satisfied: packaging in ./shark_venv3.0/lib/python3.9/site-packages (from gradio) (23.1)
|
29 |
+
Requirement already satisfied: websockets<12.0,>=10.0 in ./shark_venv3.0/lib/python3.9/site-packages (from gradio-client==0.16.4->gradio) (11.0.2)
|
30 |
+
Requirement already satisfied: fsspec in ./shark_venv3.0/lib/python3.9/site-packages (from gradio-client==0.16.4->gradio) (2024.5.0)
|
31 |
+
Requirement already satisfied: jsonschema>=3.0 in ./shark_venv3.0/lib/python3.9/site-packages (from altair<6.0,>=4.2.0->gradio) (4.17.3)
|
32 |
+
Requirement already satisfied: toolz in ./shark_venv3.0/lib/python3.9/site-packages (from altair<6.0,>=4.2.0->gradio) (0.12.0)
|
33 |
+
Requirement already satisfied: entrypoints in ./shark_venv3.0/lib/python3.9/site-packages (from altair<6.0,>=4.2.0->gradio) (0.4)
|
34 |
+
Requirement already satisfied: certifi in ./shark_venv3.0/lib/python3.9/site-packages (from httpx>=0.24.1->gradio) (2022.12.7)
|
35 |
+
Requirement already satisfied: idna in ./shark_venv3.0/lib/python3.9/site-packages (from httpx>=0.24.1->gradio) (3.4)
|
36 |
+
Requirement already satisfied: sniffio in ./shark_venv3.0/lib/python3.9/site-packages (from httpx>=0.24.1->gradio) (1.3.0)
|
37 |
+
Requirement already satisfied: httpcore==1.* in ./shark_venv3.0/lib/python3.9/site-packages (from httpx>=0.24.1->gradio) (1.0.5)
|
38 |
+
Requirement already satisfied: anyio in ./shark_venv3.0/lib/python3.9/site-packages (from httpx>=0.24.1->gradio) (3.6.2)
|
39 |
+
Requirement already satisfied: h11<0.15,>=0.13 in ./shark_venv3.0/lib/python3.9/site-packages (from httpcore==1.*->httpx>=0.24.1->gradio) (0.14.0)
|
40 |
+
Requirement already satisfied: filelock in ./shark_venv3.0/lib/python3.9/site-packages (from huggingface-hub>=0.19.3->gradio) (3.12.0)
|
41 |
+
Requirement already satisfied: tqdm>=4.42.1 in ./shark_venv3.0/lib/python3.9/site-packages (from huggingface-hub>=0.19.3->gradio) (4.65.0)
|
42 |
+
Requirement already satisfied: requests in ./shark_venv3.0/lib/python3.9/site-packages (from huggingface-hub>=0.19.3->gradio) (2.32.2)
|
43 |
+
Requirement already satisfied: zipp>=3.1.0 in ./shark_venv3.0/lib/python3.9/site-packages (from importlib-resources<7.0,>=1.3->gradio) (3.15.0)
|
44 |
+
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in ./shark_venv3.0/lib/python3.9/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.19.3)
|
45 |
+
Requirement already satisfied: attrs>=17.4.0 in ./shark_venv3.0/lib/python3.9/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (23.1.0)
|
46 |
+
Requirement already satisfied: cycler>=0.10 in ./shark_venv3.0/lib/python3.9/site-packages (from matplotlib~=3.0->gradio) (0.11.0)
|
47 |
+
Requirement already satisfied: fonttools>=4.22.0 in ./shark_venv3.0/lib/python3.9/site-packages (from matplotlib~=3.0->gradio) (4.39.3)
|
48 |
+
Requirement already satisfied: kiwisolver>=1.0.1 in ./shark_venv3.0/lib/python3.9/site-packages (from matplotlib~=3.0->gradio) (1.4.4)
|
49 |
+
Requirement already satisfied: python-dateutil>=2.7 in ./shark_venv3.0/lib/python3.9/site-packages (from matplotlib~=3.0->gradio) (2.8.2)
|
50 |
+
Requirement already satisfied: contourpy>=1.0.1 in ./shark_venv3.0/lib/python3.9/site-packages (from matplotlib~=3.0->gradio) (1.0.7)
|
51 |
+
Requirement already satisfied: pyparsing>=2.3.1 in ./shark_venv3.0/lib/python3.9/site-packages (from matplotlib~=3.0->gradio) (3.0.9)
|
52 |
+
Requirement already satisfied: pytz>=2020.1 in ./shark_venv3.0/lib/python3.9/site-packages (from pandas<3.0,>=1.0->gradio) (2023.3)
|
53 |
+
Requirement already satisfied: tzdata>=2022.1 in ./shark_venv3.0/lib/python3.9/site-packages (from pandas<3.0,>=1.0->gradio) (2023.3)
|
54 |
+
Requirement already satisfied: annotated-types>=0.4.0 in ./shark_venv3.0/lib/python3.9/site-packages (from pydantic>=2.0->gradio) (0.7.0)
|
55 |
+
Requirement already satisfied: pydantic-core==2.18.2 in ./shark_venv3.0/lib/python3.9/site-packages (from pydantic>=2.0->gradio) (2.18.2)
|
56 |
+
Requirement already satisfied: six>=1.5 in ./shark_venv3.0/lib/python3.9/site-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio) (1.16.0)
|
57 |
+
Requirement already satisfied: rich>=10.11.0 in ./shark_venv3.0/lib/python3.9/site-packages (from typer<1.0,>=0.12->gradio) (13.3.4)
|
58 |
+
Requirement already satisfied: click>=8.0.0 in ./shark_venv3.0/lib/python3.9/site-packages (from typer<1.0,>=0.12->gradio) (8.1.3)
|
59 |
+
Requirement already satisfied: shellingham>=1.3.0 in ./shark_venv3.0/lib/python3.9/site-packages (from typer<1.0,>=0.12->gradio) (1.5.4)
|
60 |
+
Requirement already satisfied: markdown-it-py<3.0.0,>=2.2.0 in ./shark_venv3.0/lib/python3.9/site-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.2.0)
|
61 |
+
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in ./shark_venv3.0/lib/python3.9/site-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.15.1)
|
62 |
+
Requirement already satisfied: mdurl~=0.1 in ./shark_venv3.0/lib/python3.9/site-packages (from markdown-it-py<3.0.0,>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio) (0.1.2)
|
63 |
+
Requirement already satisfied: ujson!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,>=4.0.1 in ./shark_venv3.0/lib/python3.9/site-packages (from fastapi->gradio) (5.10.0)
|
64 |
+
Requirement already satisfied: fastapi-cli>=0.0.2 in ./shark_venv3.0/lib/python3.9/site-packages (from fastapi->gradio) (0.0.4)
|
65 |
+
Requirement already satisfied: email_validator>=2.0.0 in ./shark_venv3.0/lib/python3.9/site-packages (from fastapi->gradio) (2.1.1)
|
66 |
+
Requirement already satisfied: starlette<0.38.0,>=0.37.2 in ./shark_venv3.0/lib/python3.9/site-packages (from fastapi->gradio) (0.37.2)
|
67 |
+
Requirement already satisfied: dnspython>=2.0.0 in ./shark_venv3.0/lib/python3.9/site-packages (from email_validator>=2.0.0->fastapi->gradio) (2.6.1)
|
68 |
+
Requirement already satisfied: httptools>=0.5.0 in ./shark_venv3.0/lib/python3.9/site-packages (from uvicorn>=0.14.0->gradio) (0.6.1)
|
69 |
+
Requirement already satisfied: watchfiles>=0.13 in ./shark_venv3.0/lib/python3.9/site-packages (from uvicorn>=0.14.0->gradio) (0.22.0)
|
70 |
+
Requirement already satisfied: python-dotenv>=0.13 in ./shark_venv3.0/lib/python3.9/site-packages (from uvicorn>=0.14.0->gradio) (1.0.0)
|
71 |
+
Requirement already satisfied: uvloop!=0.15.0,!=0.15.1,>=0.14.0 in ./shark_venv3.0/lib/python3.9/site-packages (from uvicorn>=0.14.0->gradio) (0.19.0)
|
72 |
+
Requirement already satisfied: charset-normalizer<4,>=2 in ./shark_venv3.0/lib/python3.9/site-packages (from requests->huggingface-hub>=0.19.3->gradio) (3.1.0)
|
app.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
import subprocess
|
3 |
import os
|
4 |
if os.getenv('SYSTEM') == 'spaces':
|
5 |
-
|
6 |
subprocess.call('pip install -U openmim'.split())
|
7 |
subprocess.call('pip install python-dotenv'.split())
|
8 |
subprocess.call('pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113'.split())
|
@@ -57,6 +57,7 @@ def add_border(frame, color = (255, 0, 0), thickness = 2):
|
|
57 |
|
58 |
|
59 |
|
|
|
60 |
def overlay_text_on_image(image, text_list, font=cv2.FONT_HERSHEY_SIMPLEX, font_size=0.5, font_thickness=1, margin=10, color=(255, 255, 255), box_color=(0,0,0)):
|
61 |
relative = min(image.shape[0], image.shape[1])
|
62 |
y0, dy = margin, int(relative*0.1) # start y position and line gap
|
@@ -64,7 +65,7 @@ def overlay_text_on_image(image, text_list, font=cv2.FONT_HERSHEY_SIMPLEX, font_
|
|
64 |
for i, line in enumerate(text_list):
|
65 |
y = y0 + i * dy
|
66 |
if 'Shark' in line or 'Human' in line:
|
67 |
-
current_font_size = font_size * 1.
|
68 |
text_width, text_height = cv2.getTextSize(line, font, current_font_size, font_thickness)[0]
|
69 |
cv2.rectangle(image, (image.shape[1] - text_width - margin - 5, y - text_height), (image.shape[1] - margin + 5, y + 5), box_color, -1)
|
70 |
cv2.putText(image, line, (image.shape[1] - text_width - margin, y), font, current_font_size, color, font_thickness, lineType=cv2.LINE_AA)
|
@@ -158,11 +159,11 @@ def draw_cockpit(frame, top_pred,cnt):
|
|
158 |
# strings = [shark_sighted, human_sighted, shark_size_estimate, shark_weight_estimate, danger_level]
|
159 |
relative = max(frame.shape[0],frame.shape[1])
|
160 |
if top_pred['shark_sighted'] and top_pred['dangerous_dist_confirmed'] and cnt%2 == 0:
|
161 |
-
frame = add_border(frame, color=high_danger_color, thickness=int(relative*0.025))
|
162 |
frame = add_danger_symbol_from_image(frame, top_pred)
|
163 |
elif top_pred['shark_sighted'] and not top_pred['dangerous_dist_confirmed'] and cnt%2 == 0:
|
164 |
-
|
165 |
-
|
166 |
else:
|
167 |
|
168 |
frame = add_border(frame, color=(0,0,0), thickness=int(relative*0.025))
|
@@ -172,7 +173,7 @@ def draw_cockpit(frame, top_pred,cnt):
|
|
172 |
|
173 |
|
174 |
|
175 |
-
def process_video(input_video, out_fps = 'auto', skip_frames =
|
176 |
print('Processing video: ')
|
177 |
|
178 |
try:
|
@@ -267,16 +268,17 @@ def process_video(input_video, out_fps = 'auto', skip_frames = 7):
|
|
267 |
yield None, output_path
|
268 |
|
269 |
with gr.Blocks(theme=theme) as demo:
|
|
|
270 |
input_video = gr.File(label="Input")
|
271 |
|
272 |
|
273 |
-
with gr.Row()
|
274 |
|
275 |
-
original_frames = gr.Image(label="Processed Frame")
|
276 |
#processed_frames = gr.Image(label="Shark Engine")
|
277 |
|
278 |
#dashboard = gr.Image(label="Events")
|
279 |
-
output_video = gr.
|
280 |
with gr.Row():
|
281 |
paths = sorted(pathlib.Path('videos_example/').rglob('*.mp4'))
|
282 |
samples=[[path.as_posix()] for path in paths if 'raw_videos' in str(path)]
|
|
|
2 |
import subprocess
|
3 |
import os
|
4 |
if os.getenv('SYSTEM') == 'spaces':
|
5 |
+
subprocess.call('pip install gradio==4.35.0'.split())
|
6 |
subprocess.call('pip install -U openmim'.split())
|
7 |
subprocess.call('pip install python-dotenv'.split())
|
8 |
subprocess.call('pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113'.split())
|
|
|
57 |
|
58 |
|
59 |
|
60 |
+
|
61 |
def overlay_text_on_image(image, text_list, font=cv2.FONT_HERSHEY_SIMPLEX, font_size=0.5, font_thickness=1, margin=10, color=(255, 255, 255), box_color=(0,0,0)):
|
62 |
relative = min(image.shape[0], image.shape[1])
|
63 |
y0, dy = margin, int(relative*0.1) # start y position and line gap
|
|
|
65 |
for i, line in enumerate(text_list):
|
66 |
y = y0 + i * dy
|
67 |
if 'Shark' in line or 'Human' in line:
|
68 |
+
current_font_size = font_size * 1.2
|
69 |
text_width, text_height = cv2.getTextSize(line, font, current_font_size, font_thickness)[0]
|
70 |
cv2.rectangle(image, (image.shape[1] - text_width - margin - 5, y - text_height), (image.shape[1] - margin + 5, y + 5), box_color, -1)
|
71 |
cv2.putText(image, line, (image.shape[1] - text_width - margin, y), font, current_font_size, color, font_thickness, lineType=cv2.LINE_AA)
|
|
|
159 |
# strings = [shark_sighted, human_sighted, shark_size_estimate, shark_weight_estimate, danger_level]
|
160 |
relative = max(frame.shape[0],frame.shape[1])
|
161 |
if top_pred['shark_sighted'] and top_pred['dangerous_dist_confirmed'] and cnt%2 == 0:
|
162 |
+
#frame = add_border(frame, color=high_danger_color, thickness=int(relative*0.025))
|
163 |
frame = add_danger_symbol_from_image(frame, top_pred)
|
164 |
elif top_pred['shark_sighted'] and not top_pred['dangerous_dist_confirmed'] and cnt%2 == 0:
|
165 |
+
#frame = add_border(frame, color=low_danger_color, thickness=int(relative*0.025))
|
166 |
+
frame = add_danger_symbol_from_image(frame, top_pred)
|
167 |
else:
|
168 |
|
169 |
frame = add_border(frame, color=(0,0,0), thickness=int(relative*0.025))
|
|
|
173 |
|
174 |
|
175 |
|
176 |
+
def process_video(input_video, out_fps = 'auto', skip_frames = 5):
|
177 |
print('Processing video: ')
|
178 |
|
179 |
try:
|
|
|
268 |
yield None, output_path
|
269 |
|
270 |
with gr.Blocks(theme=theme) as demo:
|
271 |
+
gr.Markdown("Alpha Demo of the Sharkpatrol Oceanlife Detector.")
|
272 |
input_video = gr.File(label="Input")
|
273 |
|
274 |
|
275 |
+
with gr.Row(): #.style(equal_height=True,height='25%'):
|
276 |
|
277 |
+
original_frames = gr.Image(label="Processed Frame") #.style( height=650)
|
278 |
#processed_frames = gr.Image(label="Shark Engine")
|
279 |
|
280 |
#dashboard = gr.Image(label="Events")
|
281 |
+
output_video = gr.Video(label="Output Video")
|
282 |
with gr.Row():
|
283 |
paths = sorted(pathlib.Path('videos_example/').rglob('*.mp4'))
|
284 |
samples=[[path.as_posix()] for path in paths if 'raw_videos' in str(path)]
|