From: Georgi Gerganov Date: Tue, 13 Dec 2022 19:46:42 +0000 (+0200) Subject: command : better indentation X-Git-Tag: upstream/1.7.4~1705 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=43129959749beead6eb3bbb4438812bbef55acc9;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp command : better indentation --- diff --git a/examples/command/command.cpp b/examples/command/command.cpp index fac0fb0e..094e5a0e 100644 --- a/examples/command/command.cpp +++ b/examples/command/command.cpp @@ -618,7 +618,7 @@ int main(int argc, char ** argv) { for (int i = 0; i < (int) allowed_commands.size(); ++i) { fprintf(stderr, " - \033[1m%-*s\033[0m = [", max_len, allowed_commands[i].c_str()); for (const auto & token : allowed_tokens[i]) { - fprintf(stderr, " %d", token); + fprintf(stderr, " %5d", token); } fprintf(stderr, " ]\n"); } @@ -835,7 +835,7 @@ int main(int argc, char ** argv) { for (const auto & cmd : probs_id) { fprintf(stdout, "%s: %s%-*s%s = %f | ", __func__, "\033[1m", max_len, allowed_commands[cmd.second].c_str(), "\033[0m", cmd.first); for (int i = 0; i < (int) allowed_tokens[cmd.second].size(); ++i) { - fprintf(stdout, "%f ", probs[allowed_tokens[cmd.second][i]]); + fprintf(stdout, "'%4s' %f ", whisper_token_to_str(ctx, allowed_tokens[cmd.second][i]), probs[allowed_tokens[cmd.second][i]]); } fprintf(stdout, "\n"); }