INNER CODE UNIT · Python
index
Kabanosk/whisper-website · src/api/transcription.py:16
def index(request: Request):
return template.TemplateResponse(request, "index.html", {"text": None})
@router.post("/download/")
def download_subtitle(
request: Request,
file: bytes = File(),
model_type: WhisperModelType = Form(WhisperModelType.TINY),
timestamps: bool = Form(False),
filename: str = Form("subtitles"),
file_type: SubtitleFileType = Form(SubtitleFileType.SRT),
max_characters: int = Form(DEFAULT_MAX_CHARACTERS),
translate_to: str = Form("no_translation"),
):
transcription = TranscriptionRequest(
model_type=model_type,
timestamps=timestamps,