

fix: lint errors
@a76f247f9dfb40d41a942b418f6b428705cbc393
--- faster_whisper_server/gradio_app.py
+++ faster_whisper_server/gradio_app.py
... | ... | @@ -10,13 +10,14 @@ |
10 | 10 |
|
11 | 11 |
TRANSCRIPTION_ENDPOINT = "/v1/audio/transcriptions" |
12 | 12 |
TRANSLATION_ENDPOINT = "/v1/audio/translations" |
13 |
+TIMEOUT_SECONDS = 180 |
|
13 | 14 |
|
14 | 15 |
|
15 | 16 |
def create_gradio_demo(config: Config) -> gr.Blocks: |
16 | 17 |
host = os.getenv("UVICORN_HOST", "0.0.0.0") |
17 | 18 |
port = int(os.getenv("UVICORN_PORT", "8000")) |
18 | 19 |
# NOTE: worth looking into generated clients |
19 |
- http_client = httpx.Client(base_url=f"http://{host}:{port}", timeout=None) |
|
20 |
+ http_client = httpx.Client(base_url=f"http://{host}:{port}", timeout=httpx.Timeout(timeout=TIMEOUT_SECONDS)) |
|
20 | 21 |
openai_client = OpenAI(base_url=f"http://{host}:{port}/v1", api_key="cant-be-empty") |
21 | 22 |
|
22 | 23 |
def handler(file_path: str, model: str, task: Task, temperature: float, stream: bool) -> Generator[str, None, None]: |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?