ggerganov commited on
Commit
7a2aa88
·
1 Parent(s): a73a606

command : better indentation

Browse files
Files changed (1) hide show
  1. examples/command/command.cpp +2 -2
examples/command/command.cpp CHANGED
@@ -618,7 +618,7 @@ int main(int argc, char ** argv) {
618
  for (int i = 0; i < (int) allowed_commands.size(); ++i) {
619
  fprintf(stderr, " - \033[1m%-*s\033[0m = [", max_len, allowed_commands[i].c_str());
620
  for (const auto & token : allowed_tokens[i]) {
621
- fprintf(stderr, " %d", token);
622
  }
623
  fprintf(stderr, " ]\n");
624
  }
@@ -835,7 +835,7 @@ int main(int argc, char ** argv) {
835
  for (const auto & cmd : probs_id) {
836
  fprintf(stdout, "%s: %s%-*s%s = %f | ", __func__, "\033[1m", max_len, allowed_commands[cmd.second].c_str(), "\033[0m", cmd.first);
837
  for (int i = 0; i < (int) allowed_tokens[cmd.second].size(); ++i) {
838
- fprintf(stdout, "%f ", probs[allowed_tokens[cmd.second][i]]);
839
  }
840
  fprintf(stdout, "\n");
841
  }
 
618
  for (int i = 0; i < (int) allowed_commands.size(); ++i) {
619
  fprintf(stderr, " - \033[1m%-*s\033[0m = [", max_len, allowed_commands[i].c_str());
620
  for (const auto & token : allowed_tokens[i]) {
621
+ fprintf(stderr, " %5d", token);
622
  }
623
  fprintf(stderr, " ]\n");
624
  }
 
835
  for (const auto & cmd : probs_id) {
836
  fprintf(stdout, "%s: %s%-*s%s = %f | ", __func__, "\033[1m", max_len, allowed_commands[cmd.second].c_str(), "\033[0m", cmd.first);
837
  for (int i = 0; i < (int) allowed_tokens[cmd.second].size(); ++i) {
838
+ fprintf(stdout, "'%4s' %f ", whisper_token_to_str(ctx, allowed_tokens[cmd.second][i]), probs[allowed_tokens[cmd.second][i]]);
839
  }
840
  fprintf(stdout, "\n");
841
  }