Spaces:
Running
Running
command : better indentation
Browse files
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, " %
|
| 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 |
}
|