Fedir Zadniprovskyi commited on
Commit
2393ed2
β€’
1 Parent(s): 8b9b750

feat: use `uv` package manager, pin dependencies

Browse files
.github/workflows/lint.yaml CHANGED
@@ -10,10 +10,11 @@ jobs:
10
  runs-on: ubuntu-latest
11
  steps:
12
  - uses: actions/checkout@v4
13
- - uses: actions/setup-python@v5
14
  with:
15
- python-version: 3.12
16
- - run: pip install uv
17
- - run: uv pip install --system -r requirements-dev.txt
18
- - run: ruff check .
19
- - run: ruff format --check --diff .
 
 
10
  runs-on: ubuntu-latest
11
  steps:
12
  - uses: actions/checkout@v4
13
+ - uses: astral-sh/setup-uv@v2
14
  with:
15
+ version: "0.4.4"
16
+ enable-cache: true
17
+ - run: uv python install 3.12
18
+ - run: uv sync --extra dev
19
+ - run: uv run ruff check .
20
+ - run: uv run ruff format --check --diff .
.github/workflows/test.yaml CHANGED
@@ -10,10 +10,11 @@ jobs:
10
  runs-on: ubuntu-latest
11
  steps:
12
  - uses: actions/checkout@v4
13
- - uses: actions/setup-python@v5
14
  with:
15
- python-version: 3.12
16
- - run: pip install uv
17
- - run: uv pip install --no-cache --system -r requirements-dev.txt
 
18
  # TODO: figure out why `pytest` doesn't discover tests in `faster_whisper_server` directory by itself
19
- - run: pytest faster_whisper_server/* tests
 
10
  runs-on: ubuntu-latest
11
  steps:
12
  - uses: actions/checkout@v4
13
+ - uses: astral-sh/setup-uv@v2
14
  with:
15
+ version: "0.4.4"
16
+ enable-cache: true
17
+ - run: uv python install 3.12
18
+ - run: uv sync --extra dev
19
  # TODO: figure out why `pytest` doesn't discover tests in `faster_whisper_server` directory by itself
20
+ - run: uv run pytest src/faster_whisper_server/* tests
Dockerfile.cpu CHANGED
@@ -7,14 +7,19 @@ RUN apt-get update && \
7
  DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3.12 python3.12-distutils && \
8
  apt-get clean && \
9
  rm -rf /var/lib/apt/lists/*
 
10
  WORKDIR /root/faster-whisper-server
11
- COPY requirements.txt .
12
- RUN --mount=from=ghcr.io/astral-sh/uv:latest,source=/uv,target=/bin/uv \
13
- uv pip install --system --python 3.12 --no-cache -r requirements.txt
14
- COPY ./faster_whisper_server ./faster_whisper_server
 
 
 
 
15
  ENV WHISPER__MODEL=Systran/faster-whisper-medium.en
16
  ENV WHISPER__INFERENCE_DEVICE=cpu
17
  ENV WHISPER__COMPUTE_TYPE=int8
18
  ENV UVICORN_HOST=0.0.0.0
19
  ENV UVICORN_PORT=8000
20
- CMD ["uvicorn", "faster_whisper_server.main:app"]
 
7
  DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3.12 python3.12-distutils && \
8
  apt-get clean && \
9
  rm -rf /var/lib/apt/lists/*
10
+ COPY --from=ghcr.io/astral-sh/uv:0.4.4 /uv /bin/uv
11
  WORKDIR /root/faster-whisper-server
12
+ # https://docs.astral.sh/uv/guides/integration/docker/#intermediate-layers
13
+ RUN --mount=type=cache,target=/root/.cache/uv \
14
+ --mount=type=bind,source=uv.lock,target=uv.lock \
15
+ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
16
+ uv sync --frozen --no-install-project
17
+ COPY ./src ./pyproject.toml ./uv.lock ./
18
+ RUN --mount=type=cache,target=/root/.cache/uv \
19
+ uv sync --frozen
20
  ENV WHISPER__MODEL=Systran/faster-whisper-medium.en
21
  ENV WHISPER__INFERENCE_DEVICE=cpu
22
  ENV WHISPER__COMPUTE_TYPE=int8
23
  ENV UVICORN_HOST=0.0.0.0
24
  ENV UVICORN_PORT=8000
25
+ CMD ["uv", "run", "uvicorn", "faster_whisper_server.main:app"]
Dockerfile.cuda CHANGED
@@ -7,13 +7,18 @@ RUN apt-get update && \
7
  DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3.12 python3.12-distutils && \
8
  apt-get clean && \
9
  rm -rf /var/lib/apt/lists/*
 
10
  WORKDIR /root/faster-whisper-server
11
- COPY requirements.txt .
12
- RUN --mount=from=ghcr.io/astral-sh/uv:latest,source=/uv,target=/bin/uv \
13
- uv pip install --system --python 3.12 --no-cache -r requirements.txt
14
- COPY ./faster_whisper_server ./faster_whisper_server
 
 
 
 
15
  ENV WHISPER__MODEL=Systran/faster-distil-whisper-large-v3
16
  ENV WHISPER__INFERENCE_DEVICE=auto
17
  ENV UVICORN_HOST=0.0.0.0
18
  ENV UVICORN_PORT=8000
19
- CMD ["uvicorn", "faster_whisper_server.main:app"]
 
7
  DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3.12 python3.12-distutils && \
8
  apt-get clean && \
9
  rm -rf /var/lib/apt/lists/*
10
+ COPY --from=ghcr.io/astral-sh/uv:0.4.4 /uv /bin/uv
11
  WORKDIR /root/faster-whisper-server
12
+ # https://docs.astral.sh/uv/guides/integration/docker/#intermediate-layers
13
+ RUN --mount=type=cache,target=/root/.cache/uv \
14
+ --mount=type=bind,source=uv.lock,target=uv.lock \
15
+ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
16
+ uv sync --frozen --no-install-project
17
+ COPY ./src ./pyproject.toml ./uv.lock ./
18
+ RUN --mount=type=cache,target=/root/.cache/uv \
19
+ uv sync --frozen
20
  ENV WHISPER__MODEL=Systran/faster-distil-whisper-large-v3
21
  ENV WHISPER__INFERENCE_DEVICE=auto
22
  ENV UVICORN_HOST=0.0.0.0
23
  ENV UVICORN_PORT=8000
24
+ CMD ["uv", "run", "uvicorn", "faster_whisper_server.main:app"]
Taskfile.yaml CHANGED
@@ -12,18 +12,6 @@ tasks:
12
  sources:
13
  - Dockerfile.*
14
  - faster_whisper_server/*.py
15
- pip-compile:
16
- cmds:
17
- - uv pip compile --override overrides.txt pyproject.toml {{.CLI_ARGS}} > requirements.txt
18
- - uv pip compile --override overrides.txt --extra dev pyproject.toml {{.CLI_ARGS}} > requirements-dev.txt
19
- - uv pip compile --override overrides.txt --all-extras pyproject.toml {{.CLI_ARGS}} > requirements-all.txt
20
- sources:
21
- - pyproject.toml
22
- pip-sync:
23
- cmds:
24
- - uv pip sync requirements-all.txt
25
- sources:
26
- - requirements-all.txt
27
  create-multi-arch-builder: docker buildx create --name main --driver=docker-container
28
  docker-build:
29
  cmds:
 
12
  sources:
13
  - Dockerfile.*
14
  - faster_whisper_server/*.py
 
 
 
 
 
 
 
 
 
 
 
 
15
  create-multi-arch-builder: docker buildx create --name main --driver=docker-container
16
  docker-build:
17
  cmds:
overrides.txt DELETED
File without changes
pyproject.toml CHANGED
@@ -3,34 +3,38 @@ name = "faster-whisper-server"
3
  version = "0.1.0"
4
  requires-python = ">=3.12,<3.13"
5
  dependencies = [
6
- "pydantic",
7
- "fastapi",
8
- "uvicorn",
9
- "python-multipart",
10
- "soundfile",
11
- "pydantic-settings",
12
  "numpy<2.0.0",
13
  "faster-whisper==1.0.3",
14
- "huggingface-hub",
15
- "httpx-sse",
16
- "httpx",
17
- "gradio",
18
- "openai",
19
  ]
20
 
21
  [project.optional-dependencies]
22
  client = [
23
- "keyboard",
24
  ]
25
  dev = [
26
  "ruff==0.5.3",
27
- "pytest",
28
- "webvtt-py",
29
- "srt",
30
  "basedpyright==1.13.0",
31
- "pytest-xdist"
32
  ]
33
 
 
 
 
 
34
  # https://docs.astral.sh/ruff/configuration/
35
  [tool.ruff]
36
  line-length = 120
 
3
  version = "0.1.0"
4
  requires-python = ">=3.12,<3.13"
5
  dependencies = [
6
+ "pydantic==2.9.0",
7
+ "fastapi==0.113.0",
8
+ "uvicorn==0.30.6",
9
+ "python-multipart==0.0.9",
10
+ "soundfile==0.12.1",
11
+ "pydantic-settings==2.4.0",
12
  "numpy<2.0.0",
13
  "faster-whisper==1.0.3",
14
+ "huggingface-hub==0.24.6",
15
+ "httpx-sse==0.4.0",
16
+ "httpx==0.27.2",
17
+ "gradio==4.42.0",
18
+ "openai==1.43.1",
19
  ]
20
 
21
  [project.optional-dependencies]
22
  client = [
23
+ "keyboard==0.13.5",
24
  ]
25
  dev = [
26
  "ruff==0.5.3",
27
+ "pytest==8.3.2",
28
+ "webvtt-py==0.5.1",
29
+ "srt==3.5.3",
30
  "basedpyright==1.13.0",
31
+ "pytest-xdist==3.6.1"
32
  ]
33
 
34
+ [build-system]
35
+ requires = ["hatchling"]
36
+ build-backend = "hatchling.build"
37
+
38
  # https://docs.astral.sh/ruff/configuration/
39
  [tool.ruff]
40
  line-length = 120
requirements-all.txt DELETED
@@ -1,257 +0,0 @@
1
- # This file was autogenerated by uv via the following command:
2
- # uv pip compile --override overrides.txt --all-extras pyproject.toml
3
- aiofiles==23.2.1
4
- # via gradio
5
- annotated-types==0.7.0
6
- # via pydantic
7
- anyio==4.4.0
8
- # via
9
- # gradio
10
- # httpx
11
- # openai
12
- # starlette
13
- av==12.3.0
14
- # via faster-whisper
15
- basedpyright==1.13.0
16
- # via faster-whisper-server (pyproject.toml)
17
- certifi==2024.8.30
18
- # via
19
- # httpcore
20
- # httpx
21
- # requests
22
- cffi==1.17.1
23
- # via soundfile
24
- charset-normalizer==3.3.2
25
- # via requests
26
- click==8.1.7
27
- # via
28
- # typer
29
- # uvicorn
30
- coloredlogs==15.0.1
31
- # via onnxruntime
32
- contourpy==1.3.0
33
- # via matplotlib
34
- ctranslate2==4.3.1
35
- # via faster-whisper
36
- cycler==0.12.1
37
- # via matplotlib
38
- distro==1.9.0
39
- # via openai
40
- execnet==2.1.1
41
- # via pytest-xdist
42
- fastapi==0.113.0
43
- # via
44
- # faster-whisper-server (pyproject.toml)
45
- # gradio
46
- faster-whisper==1.0.3
47
- # via faster-whisper-server (pyproject.toml)
48
- ffmpy==0.4.0
49
- # via gradio
50
- filelock==3.15.4
51
- # via huggingface-hub
52
- flatbuffers==24.3.25
53
- # via onnxruntime
54
- fonttools==4.53.1
55
- # via matplotlib
56
- fsspec==2024.9.0
57
- # via
58
- # gradio-client
59
- # huggingface-hub
60
- gradio==4.42.0
61
- # via faster-whisper-server (pyproject.toml)
62
- gradio-client==1.3.0
63
- # via gradio
64
- h11==0.14.0
65
- # via
66
- # httpcore
67
- # uvicorn
68
- httpcore==1.0.5
69
- # via httpx
70
- httpx==0.27.2
71
- # via
72
- # faster-whisper-server (pyproject.toml)
73
- # gradio
74
- # gradio-client
75
- # openai
76
- httpx-sse==0.4.0
77
- # via faster-whisper-server (pyproject.toml)
78
- huggingface-hub==0.24.6
79
- # via
80
- # faster-whisper-server (pyproject.toml)
81
- # faster-whisper
82
- # gradio
83
- # gradio-client
84
- # tokenizers
85
- humanfriendly==10.0
86
- # via coloredlogs
87
- idna==3.8
88
- # via
89
- # anyio
90
- # httpx
91
- # requests
92
- importlib-resources==6.4.4
93
- # via gradio
94
- iniconfig==2.0.0
95
- # via pytest
96
- jinja2==3.1.4
97
- # via gradio
98
- jiter==0.5.0
99
- # via openai
100
- keyboard==0.13.5
101
- # via faster-whisper-server (pyproject.toml)
102
- kiwisolver==1.4.7
103
- # via matplotlib
104
- markdown-it-py==3.0.0
105
- # via rich
106
- markupsafe==2.1.5
107
- # via
108
- # gradio
109
- # jinja2
110
- matplotlib==3.9.2
111
- # via gradio
112
- mdurl==0.1.2
113
- # via markdown-it-py
114
- mpmath==1.3.0
115
- # via sympy
116
- nodejs-wheel-binaries==20.17.0
117
- # via basedpyright
118
- numpy==1.26.4
119
- # via
120
- # faster-whisper-server (pyproject.toml)
121
- # contourpy
122
- # ctranslate2
123
- # gradio
124
- # matplotlib
125
- # onnxruntime
126
- # pandas
127
- onnxruntime==1.19.2
128
- # via faster-whisper
129
- openai==1.43.1
130
- # via faster-whisper-server (pyproject.toml)
131
- orjson==3.10.7
132
- # via gradio
133
- packaging==24.1
134
- # via
135
- # gradio
136
- # gradio-client
137
- # huggingface-hub
138
- # matplotlib
139
- # onnxruntime
140
- # pytest
141
- pandas==2.2.2
142
- # via gradio
143
- pillow==10.4.0
144
- # via
145
- # gradio
146
- # matplotlib
147
- pluggy==1.5.0
148
- # via pytest
149
- protobuf==5.28.0
150
- # via onnxruntime
151
- pycparser==2.22
152
- # via cffi
153
- pydantic==2.9.0
154
- # via
155
- # faster-whisper-server (pyproject.toml)
156
- # fastapi
157
- # gradio
158
- # openai
159
- # pydantic-settings
160
- pydantic-core==2.23.2
161
- # via pydantic
162
- pydantic-settings==2.4.0
163
- # via faster-whisper-server (pyproject.toml)
164
- pydub==0.25.1
165
- # via gradio
166
- pygments==2.18.0
167
- # via rich
168
- pyparsing==3.1.4
169
- # via matplotlib
170
- pytest==8.3.2
171
- # via
172
- # faster-whisper-server (pyproject.toml)
173
- # pytest-xdist
174
- pytest-xdist==3.6.1
175
- # via faster-whisper-server (pyproject.toml)
176
- python-dateutil==2.9.0.post0
177
- # via
178
- # matplotlib
179
- # pandas
180
- python-dotenv==1.0.1
181
- # via pydantic-settings
182
- python-multipart==0.0.9
183
- # via
184
- # faster-whisper-server (pyproject.toml)
185
- # gradio
186
- pytz==2024.1
187
- # via pandas
188
- pyyaml==6.0.2
189
- # via
190
- # ctranslate2
191
- # gradio
192
- # huggingface-hub
193
- requests==2.32.3
194
- # via huggingface-hub
195
- rich==13.8.0
196
- # via typer
197
- ruff==0.5.3
198
- # via
199
- # faster-whisper-server (pyproject.toml)
200
- # gradio
201
- semantic-version==2.10.0
202
- # via gradio
203
- setuptools==74.1.2
204
- # via ctranslate2
205
- shellingham==1.5.4
206
- # via typer
207
- six==1.16.0
208
- # via python-dateutil
209
- sniffio==1.3.1
210
- # via
211
- # anyio
212
- # httpx
213
- # openai
214
- soundfile==0.12.1
215
- # via faster-whisper-server (pyproject.toml)
216
- srt==3.5.3
217
- # via faster-whisper-server (pyproject.toml)
218
- starlette==0.38.4
219
- # via fastapi
220
- sympy==1.13.2
221
- # via onnxruntime
222
- tokenizers==0.20.0
223
- # via faster-whisper
224
- tomlkit==0.12.0
225
- # via gradio
226
- tqdm==4.66.5
227
- # via
228
- # huggingface-hub
229
- # openai
230
- typer==0.12.5
231
- # via gradio
232
- typing-extensions==4.12.2
233
- # via
234
- # fastapi
235
- # gradio
236
- # gradio-client
237
- # huggingface-hub
238
- # openai
239
- # pydantic
240
- # pydantic-core
241
- # typer
242
- tzdata==2024.1
243
- # via
244
- # pandas
245
- # pydantic
246
- urllib3==2.2.2
247
- # via
248
- # gradio
249
- # requests
250
- uvicorn==0.30.6
251
- # via
252
- # faster-whisper-server (pyproject.toml)
253
- # gradio
254
- websockets==12.0
255
- # via gradio-client
256
- webvtt-py==0.5.1
257
- # via faster-whisper-server (pyproject.toml)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
requirements-dev.txt DELETED
@@ -1,255 +0,0 @@
1
- # This file was autogenerated by uv via the following command:
2
- # uv pip compile --override overrides.txt --extra dev pyproject.toml
3
- aiofiles==23.2.1
4
- # via gradio
5
- annotated-types==0.7.0
6
- # via pydantic
7
- anyio==4.4.0
8
- # via
9
- # gradio
10
- # httpx
11
- # openai
12
- # starlette
13
- av==12.3.0
14
- # via faster-whisper
15
- basedpyright==1.13.0
16
- # via faster-whisper-server (pyproject.toml)
17
- certifi==2024.8.30
18
- # via
19
- # httpcore
20
- # httpx
21
- # requests
22
- cffi==1.17.1
23
- # via soundfile
24
- charset-normalizer==3.3.2
25
- # via requests
26
- click==8.1.7
27
- # via
28
- # typer
29
- # uvicorn
30
- coloredlogs==15.0.1
31
- # via onnxruntime
32
- contourpy==1.3.0
33
- # via matplotlib
34
- ctranslate2==4.3.1
35
- # via faster-whisper
36
- cycler==0.12.1
37
- # via matplotlib
38
- distro==1.9.0
39
- # via openai
40
- execnet==2.1.1
41
- # via pytest-xdist
42
- fastapi==0.113.0
43
- # via
44
- # faster-whisper-server (pyproject.toml)
45
- # gradio
46
- faster-whisper==1.0.3
47
- # via faster-whisper-server (pyproject.toml)
48
- ffmpy==0.4.0
49
- # via gradio
50
- filelock==3.15.4
51
- # via huggingface-hub
52
- flatbuffers==24.3.25
53
- # via onnxruntime
54
- fonttools==4.53.1
55
- # via matplotlib
56
- fsspec==2024.9.0
57
- # via
58
- # gradio-client
59
- # huggingface-hub
60
- gradio==4.42.0
61
- # via faster-whisper-server (pyproject.toml)
62
- gradio-client==1.3.0
63
- # via gradio
64
- h11==0.14.0
65
- # via
66
- # httpcore
67
- # uvicorn
68
- httpcore==1.0.5
69
- # via httpx
70
- httpx==0.27.2
71
- # via
72
- # faster-whisper-server (pyproject.toml)
73
- # gradio
74
- # gradio-client
75
- # openai
76
- httpx-sse==0.4.0
77
- # via faster-whisper-server (pyproject.toml)
78
- huggingface-hub==0.24.6
79
- # via
80
- # faster-whisper-server (pyproject.toml)
81
- # faster-whisper
82
- # gradio
83
- # gradio-client
84
- # tokenizers
85
- humanfriendly==10.0
86
- # via coloredlogs
87
- idna==3.8
88
- # via
89
- # anyio
90
- # httpx
91
- # requests
92
- importlib-resources==6.4.4
93
- # via gradio
94
- iniconfig==2.0.0
95
- # via pytest
96
- jinja2==3.1.4
97
- # via gradio
98
- jiter==0.5.0
99
- # via openai
100
- kiwisolver==1.4.7
101
- # via matplotlib
102
- markdown-it-py==3.0.0
103
- # via rich
104
- markupsafe==2.1.5
105
- # via
106
- # gradio
107
- # jinja2
108
- matplotlib==3.9.2
109
- # via gradio
110
- mdurl==0.1.2
111
- # via markdown-it-py
112
- mpmath==1.3.0
113
- # via sympy
114
- nodejs-wheel-binaries==20.17.0
115
- # via basedpyright
116
- numpy==1.26.4
117
- # via
118
- # faster-whisper-server (pyproject.toml)
119
- # contourpy
120
- # ctranslate2
121
- # gradio
122
- # matplotlib
123
- # onnxruntime
124
- # pandas
125
- onnxruntime==1.19.2
126
- # via faster-whisper
127
- openai==1.43.1
128
- # via faster-whisper-server (pyproject.toml)
129
- orjson==3.10.7
130
- # via gradio
131
- packaging==24.1
132
- # via
133
- # gradio
134
- # gradio-client
135
- # huggingface-hub
136
- # matplotlib
137
- # onnxruntime
138
- # pytest
139
- pandas==2.2.2
140
- # via gradio
141
- pillow==10.4.0
142
- # via
143
- # gradio
144
- # matplotlib
145
- pluggy==1.5.0
146
- # via pytest
147
- protobuf==5.28.0
148
- # via onnxruntime
149
- pycparser==2.22
150
- # via cffi
151
- pydantic==2.9.0
152
- # via
153
- # faster-whisper-server (pyproject.toml)
154
- # fastapi
155
- # gradio
156
- # openai
157
- # pydantic-settings
158
- pydantic-core==2.23.2
159
- # via pydantic
160
- pydantic-settings==2.4.0
161
- # via faster-whisper-server (pyproject.toml)
162
- pydub==0.25.1
163
- # via gradio
164
- pygments==2.18.0
165
- # via rich
166
- pyparsing==3.1.4
167
- # via matplotlib
168
- pytest==8.3.2
169
- # via
170
- # faster-whisper-server (pyproject.toml)
171
- # pytest-xdist
172
- pytest-xdist==3.6.1
173
- # via faster-whisper-server (pyproject.toml)
174
- python-dateutil==2.9.0.post0
175
- # via
176
- # matplotlib
177
- # pandas
178
- python-dotenv==1.0.1
179
- # via pydantic-settings
180
- python-multipart==0.0.9
181
- # via
182
- # faster-whisper-server (pyproject.toml)
183
- # gradio
184
- pytz==2024.1
185
- # via pandas
186
- pyyaml==6.0.2
187
- # via
188
- # ctranslate2
189
- # gradio
190
- # huggingface-hub
191
- requests==2.32.3
192
- # via huggingface-hub
193
- rich==13.8.0
194
- # via typer
195
- ruff==0.5.3
196
- # via
197
- # faster-whisper-server (pyproject.toml)
198
- # gradio
199
- semantic-version==2.10.0
200
- # via gradio
201
- setuptools==74.1.2
202
- # via ctranslate2
203
- shellingham==1.5.4
204
- # via typer
205
- six==1.16.0
206
- # via python-dateutil
207
- sniffio==1.3.1
208
- # via
209
- # anyio
210
- # httpx
211
- # openai
212
- soundfile==0.12.1
213
- # via faster-whisper-server (pyproject.toml)
214
- srt==3.5.3
215
- # via faster-whisper-server (pyproject.toml)
216
- starlette==0.38.4
217
- # via fastapi
218
- sympy==1.13.2
219
- # via onnxruntime
220
- tokenizers==0.20.0
221
- # via faster-whisper
222
- tomlkit==0.12.0
223
- # via gradio
224
- tqdm==4.66.5
225
- # via
226
- # huggingface-hub
227
- # openai
228
- typer==0.12.5
229
- # via gradio
230
- typing-extensions==4.12.2
231
- # via
232
- # fastapi
233
- # gradio
234
- # gradio-client
235
- # huggingface-hub
236
- # openai
237
- # pydantic
238
- # pydantic-core
239
- # typer
240
- tzdata==2024.1
241
- # via
242
- # pandas
243
- # pydantic
244
- urllib3==2.2.2
245
- # via
246
- # gradio
247
- # requests
248
- uvicorn==0.30.6
249
- # via
250
- # faster-whisper-server (pyproject.toml)
251
- # gradio
252
- websockets==12.0
253
- # via gradio-client
254
- webvtt-py==0.5.1
255
- # via faster-whisper-server (pyproject.toml)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
requirements.txt DELETED
@@ -1,232 +0,0 @@
1
- # This file was autogenerated by uv via the following command:
2
- # uv pip compile --override overrides.txt pyproject.toml
3
- aiofiles==23.2.1
4
- # via gradio
5
- annotated-types==0.7.0
6
- # via pydantic
7
- anyio==4.4.0
8
- # via
9
- # gradio
10
- # httpx
11
- # openai
12
- # starlette
13
- av==12.3.0
14
- # via faster-whisper
15
- certifi==2024.8.30
16
- # via
17
- # httpcore
18
- # httpx
19
- # requests
20
- cffi==1.17.1
21
- # via soundfile
22
- charset-normalizer==3.3.2
23
- # via requests
24
- click==8.1.7
25
- # via
26
- # typer
27
- # uvicorn
28
- coloredlogs==15.0.1
29
- # via onnxruntime
30
- contourpy==1.3.0
31
- # via matplotlib
32
- ctranslate2==4.3.1
33
- # via faster-whisper
34
- cycler==0.12.1
35
- # via matplotlib
36
- distro==1.9.0
37
- # via openai
38
- fastapi==0.113.0
39
- # via
40
- # faster-whisper-server (pyproject.toml)
41
- # gradio
42
- faster-whisper==1.0.3
43
- # via faster-whisper-server (pyproject.toml)
44
- ffmpy==0.4.0
45
- # via gradio
46
- filelock==3.15.4
47
- # via huggingface-hub
48
- flatbuffers==24.3.25
49
- # via onnxruntime
50
- fonttools==4.53.1
51
- # via matplotlib
52
- fsspec==2024.9.0
53
- # via
54
- # gradio-client
55
- # huggingface-hub
56
- gradio==4.42.0
57
- # via faster-whisper-server (pyproject.toml)
58
- gradio-client==1.3.0
59
- # via gradio
60
- h11==0.14.0
61
- # via
62
- # httpcore
63
- # uvicorn
64
- httpcore==1.0.5
65
- # via httpx
66
- httpx==0.27.2
67
- # via
68
- # faster-whisper-server (pyproject.toml)
69
- # gradio
70
- # gradio-client
71
- # openai
72
- httpx-sse==0.4.0
73
- # via faster-whisper-server (pyproject.toml)
74
- huggingface-hub==0.24.6
75
- # via
76
- # faster-whisper-server (pyproject.toml)
77
- # faster-whisper
78
- # gradio
79
- # gradio-client
80
- # tokenizers
81
- humanfriendly==10.0
82
- # via coloredlogs
83
- idna==3.8
84
- # via
85
- # anyio
86
- # httpx
87
- # requests
88
- importlib-resources==6.4.4
89
- # via gradio
90
- jinja2==3.1.4
91
- # via gradio
92
- jiter==0.5.0
93
- # via openai
94
- kiwisolver==1.4.7
95
- # via matplotlib
96
- markdown-it-py==3.0.0
97
- # via rich
98
- markupsafe==2.1.5
99
- # via
100
- # gradio
101
- # jinja2
102
- matplotlib==3.9.2
103
- # via gradio
104
- mdurl==0.1.2
105
- # via markdown-it-py
106
- mpmath==1.3.0
107
- # via sympy
108
- numpy==1.26.4
109
- # via
110
- # faster-whisper-server (pyproject.toml)
111
- # contourpy
112
- # ctranslate2
113
- # gradio
114
- # matplotlib
115
- # onnxruntime
116
- # pandas
117
- onnxruntime==1.19.2
118
- # via faster-whisper
119
- openai==1.43.1
120
- # via faster-whisper-server (pyproject.toml)
121
- orjson==3.10.7
122
- # via gradio
123
- packaging==24.1
124
- # via
125
- # gradio
126
- # gradio-client
127
- # huggingface-hub
128
- # matplotlib
129
- # onnxruntime
130
- pandas==2.2.2
131
- # via gradio
132
- pillow==10.4.0
133
- # via
134
- # gradio
135
- # matplotlib
136
- protobuf==5.28.0
137
- # via onnxruntime
138
- pycparser==2.22
139
- # via cffi
140
- pydantic==2.9.0
141
- # via
142
- # faster-whisper-server (pyproject.toml)
143
- # fastapi
144
- # gradio
145
- # openai
146
- # pydantic-settings
147
- pydantic-core==2.23.2
148
- # via pydantic
149
- pydantic-settings==2.4.0
150
- # via faster-whisper-server (pyproject.toml)
151
- pydub==0.25.1
152
- # via gradio
153
- pygments==2.18.0
154
- # via rich
155
- pyparsing==3.1.4
156
- # via matplotlib
157
- python-dateutil==2.9.0.post0
158
- # via
159
- # matplotlib
160
- # pandas
161
- python-dotenv==1.0.1
162
- # via pydantic-settings
163
- python-multipart==0.0.9
164
- # via
165
- # faster-whisper-server (pyproject.toml)
166
- # gradio
167
- pytz==2024.1
168
- # via pandas
169
- pyyaml==6.0.2
170
- # via
171
- # ctranslate2
172
- # gradio
173
- # huggingface-hub
174
- requests==2.32.3
175
- # via huggingface-hub
176
- rich==13.8.0
177
- # via typer
178
- ruff==0.6.4
179
- # via gradio
180
- semantic-version==2.10.0
181
- # via gradio
182
- setuptools==74.1.2
183
- # via ctranslate2
184
- shellingham==1.5.4
185
- # via typer
186
- six==1.16.0
187
- # via python-dateutil
188
- sniffio==1.3.1
189
- # via
190
- # anyio
191
- # httpx
192
- # openai
193
- soundfile==0.12.1
194
- # via faster-whisper-server (pyproject.toml)
195
- starlette==0.38.4
196
- # via fastapi
197
- sympy==1.13.2
198
- # via onnxruntime
199
- tokenizers==0.20.0
200
- # via faster-whisper
201
- tomlkit==0.12.0
202
- # via gradio
203
- tqdm==4.66.5
204
- # via
205
- # huggingface-hub
206
- # openai
207
- typer==0.12.5
208
- # via gradio
209
- typing-extensions==4.12.2
210
- # via
211
- # fastapi
212
- # gradio
213
- # gradio-client
214
- # huggingface-hub
215
- # openai
216
- # pydantic
217
- # pydantic-core
218
- # typer
219
- tzdata==2024.1
220
- # via
221
- # pandas
222
- # pydantic
223
- urllib3==2.2.2
224
- # via
225
- # gradio
226
- # requests
227
- uvicorn==0.30.6
228
- # via
229
- # faster-whisper-server (pyproject.toml)
230
- # gradio
231
- websockets==12.0
232
- # via gradio-client
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
{faster_whisper_server β†’ src/faster_whisper_server}/__init__.py RENAMED
File without changes
{faster_whisper_server β†’ src/faster_whisper_server}/asr.py RENAMED
File without changes
{faster_whisper_server β†’ src/faster_whisper_server}/audio.py RENAMED
File without changes
{faster_whisper_server β†’ src/faster_whisper_server}/config.py RENAMED
File without changes
{faster_whisper_server β†’ src/faster_whisper_server}/core.py RENAMED
File without changes
{faster_whisper_server β†’ src/faster_whisper_server}/gradio_app.py RENAMED
File without changes
{faster_whisper_server β†’ src/faster_whisper_server}/logger.py RENAMED
File without changes
{faster_whisper_server β†’ src/faster_whisper_server}/main.py RENAMED
@@ -135,7 +135,7 @@ def stop_running_model(model_name: str) -> Response:
135
  def get_models() -> ModelListResponse:
136
  models = huggingface_hub.list_models(library="ctranslate2", tags="automatic-speech-recognition", cardData=True)
137
  models = list(models)
138
- models.sort(key=lambda model: model.downloads, reverse=True)
139
  transformed_models: list[ModelObject] = []
140
  for model in models:
141
  assert model.created_at is not None
@@ -167,7 +167,7 @@ def get_model(
167
  model_name=model_name, library="ctranslate2", tags="automatic-speech-recognition", cardData=True
168
  )
169
  models = list(models)
170
- models.sort(key=lambda model: model.downloads, reverse=True)
171
  if len(models) == 0:
172
  raise HTTPException(status_code=404, detail="Model doesn't exists")
173
  exact_match: ModelInfo | None = None
 
135
  def get_models() -> ModelListResponse:
136
  models = huggingface_hub.list_models(library="ctranslate2", tags="automatic-speech-recognition", cardData=True)
137
  models = list(models)
138
+ models.sort(key=lambda model: model.downloads, reverse=True) # type: ignore # noqa: PGH003
139
  transformed_models: list[ModelObject] = []
140
  for model in models:
141
  assert model.created_at is not None
 
167
  model_name=model_name, library="ctranslate2", tags="automatic-speech-recognition", cardData=True
168
  )
169
  models = list(models)
170
+ models.sort(key=lambda model: model.downloads, reverse=True) # type: ignore # noqa: PGH003
171
  if len(models) == 0:
172
  raise HTTPException(status_code=404, detail="Model doesn't exists")
173
  exact_match: ModelInfo | None = None
{faster_whisper_server β†’ src/faster_whisper_server}/server_models.py RENAMED
File without changes
{faster_whisper_server β†’ src/faster_whisper_server}/transcriber.py RENAMED
File without changes
uv.lock ADDED
The diff for this file is too large to render. See raw diff