Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedir Zadniprovskyi authored and fedirz committed Jul 16, 2024
1 parent 178b540 commit 5449f92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion faster_whisper_server/gradio_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@

TRANSCRIPTION_ENDPOINT = "/v1/audio/transcriptions"
TRANSLATION_ENDPOINT = "/v1/audio/translations"
TIMEOUT_SECONDS = 180


def create_gradio_demo(config: Config) -> gr.Blocks:
host = os.getenv("UVICORN_HOST", "0.0.0.0")
port = int(os.getenv("UVICORN_PORT", "8000"))
# NOTE: worth looking into generated clients
http_client = httpx.Client(base_url=f"http://{host}:{port}", timeout=None)
http_client = httpx.Client(base_url=f"http://{host}:{port}", timeout=httpx.Timeout(timeout=TIMEOUT_SECONDS))
openai_client = OpenAI(base_url=f"http://{host}:{port}/v1", api_key="cant-be-empty")

def handler(file_path: str, model: str, task: Task, temperature: float, stream: bool) -> Generator[str, None, None]:
Expand Down

0 comments on commit 5449f92

Please sign in to comment.