]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
main : fix file existence check in main.cpp (whisper/1889)
authorDavidson Francis <redacted>
Thu, 22 Feb 2024 13:01:08 +0000 (10:01 -0300)
committerGeorgi Gerganov <redacted>
Thu, 22 Feb 2024 18:24:50 +0000 (20:24 +0200)
commit5c8b38ca0fcd95608c40e6bd9adfb9980710aac2
tree37159f32461a2bd93cec0a78e6847b3b834a430c
parent30805514e1bf389a59d30a54a0525cbdc30d5bd1
main : fix file existence check in main.cpp (whisper/1889)

In commit dda4b0e of PR #1872, I've introduced a check for the
existence of files before loading the model. However, I haven't
considered the case where whisper.cpp might read from stdin as well,
and in such cases, the checks should ignore the "-" argument as it
does not represent a regular file.

Additionally, this commit removes the usage of 'stat()' in favor of
the recently introduced function 'is_file_exist()' in common.cpp from
PR #1871.

Apologies for the bug introduced in the previous PR and any
inconvenience it may have caused.
examples/whisper/main.cpp